add_ref_decoration(): convert local variable original_sha1 to object_id
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
May 25, 2015 at 18:38 UTC
3d79f65735bb60b8135f26748c285a877ebb7b69
1 file changed
+3
-3
log-tree.c
+3
-3
@@ -98,14 +98,14 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
98
assert(cb_data == NULL);
99
100
if (starts_with(refname, "refs/replace/")) {
101
- unsigned char original_sha1[20];
101
+ struct object_id original_oid;
102
if (!check_replace_refs)
103
return 0;
104
- if (get_sha1_hex(refname + 13, original_sha1)) {
104
+ if (get_oid_hex(refname + 13, &original_oid)) {
105
warning("invalid replace ref %s", refname);
106
return 0;
107
}
108
- obj = parse_object(original_sha1);
108
+ obj = parse_object(original_oid.hash);
109
if (obj)
110
add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
111
return 0;