summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index 01beb11..e2f6de7 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -97,11 +97,12 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
assert(cb_data == NULL);
- if (starts_with(refname, "refs/replace/")) {
+ if (starts_with(refname, git_replace_ref_base)) {
struct object_id original_oid;
if (!check_replace_refs)
return 0;
- if (get_oid_hex(refname + 13, &original_oid)) {
+ if (get_oid_hex(refname + strlen(git_replace_ref_base),
+ &original_oid)) {
warning("invalid replace ref %s", refname);
return 0;
}