diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-05-25 18:38:58 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-25 12:19:34 -0700 |
commit | 3d79f65735bb60b8135f26748c285a877ebb7b69 (patch) | |
tree | 1934936c6695a21382e0caa68f6496318eaef303 /log-tree.c | |
parent | f124b7302353fb38f39bf4b44fd8bb0fc950c7d1 (diff) | |
download | git-3d79f65735bb60b8135f26748c285a877ebb7b69.tar.gz |
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>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/log-tree.c b/log-tree.c index abf5cc31e5..01beb11f65 100644 --- a/log-tree.c +++ b/log-tree.c @@ -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; |