提交 3d79f657 编写于 作者: M Michael Haggerty 提交者: Junio C Hamano

add_ref_decoration(): convert local variable original_sha1 to object_id

Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Nbrian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f124b730
......@@ -98,14 +98,14 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
assert(cb_data == NULL);
if (starts_with(refname, "refs/replace/")) {
unsigned char original_sha1[20];
struct object_id original_oid;
if (!check_replace_refs)
return 0;
if (get_sha1_hex(refname + 13, original_sha1)) {
if (get_oid_hex(refname + 13, &original_oid)) {
warning("invalid replace ref %s", refname);
return 0;
}
obj = parse_object(original_sha1);
obj = parse_object(original_oid.hash);
if (obj)
add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册