diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:10 -0700 |
commit | 31a0ad545681159be2ccc633a1a16a891cafbae3 (patch) | |
tree | 26ab4d6997f50fdab7ecebfa950d926683a5c492 /log-tree.c | |
parent | a17c56c056d5fea0843b429132904c429a900229 (diff) | |
parent | 58d121b22b5b83a27a1891dcf335458f687cac1e (diff) | |
download | git-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.c | 5 |
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; } |