sha1_name: refactor upstream_mark