summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 11:01:10 -0700
committerJunio C Hamano <gitster@pobox.com>2015-08-03 11:01:10 -0700
commit31a0ad545681159be2ccc633a1a16a891cafbae3 (patch)
tree26ab4d6997f50fdab7ecebfa950d926683a5c492 /log-tree.c
parenta17c56c056d5fea0843b429132904c429a900229 (diff)
parent58d121b22b5b83a27a1891dcf335458f687cac1e (diff)
downloadgit-31a0ad545681159be2ccc633a1a16a891cafbae3.tar.gz
Merge branch 'mh/replace-refs'
Add an environment variable to tell Git to look into refs hierarchy other than refs/replace/ for the object replacement data. * mh/replace-refs: Allow to control where the replace refs are looked for
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 01beb11f65..e2f6de73ef 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;
}