Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
add_ref_decoration(): convert local variable original_sha1 to object_id
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 25 May 2015 18:38:58 +0000
(18:38 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 25 May 2015 19:19:34 +0000
(12:19 -0700)
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>
log-tree.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f124b73
)
diff --git
a/log-tree.c
b/log-tree.c
index abf5cc31e5d502781c3bcde0c5401cc657d3a30e..01beb11f65b518e382fa01f18f03c5a9f2ddf529 100644
(file)
--- 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/")) {
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 (!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;
}
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;
if (obj)
add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
return 0;