summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:10 (GMT)
commit31a0ad545681159be2ccc633a1a16a891cafbae3 (patch)
tree26ab4d6997f50fdab7ecebfa950d926683a5c492 /refs.c
parenta17c56c056d5fea0843b429132904c429a900229 (diff)
parent58d121b22b5b83a27a1891dcf335458f687cac1e (diff)
downloadgit-31a0ad545681159be2ccc633a1a16a891cafbae3.zip
git-31a0ad545681159be2ccc633a1a16a891cafbae3.tar.gz
git-31a0ad545681159be2ccc633a1a16a891cafbae3.tar.bz2
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 'refs.c')
-rw-r--r--refs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 7ac05cf..227cb50 100644
--- a/refs.c
+++ b/refs.c
@@ -2122,7 +2122,8 @@ int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *c
int for_each_replace_ref(each_ref_fn fn, void *cb_data)
{
- return do_for_each_ref(&ref_cache, "refs/replace/", fn, 13, 0, cb_data);
+ return do_for_each_ref(&ref_cache, git_replace_ref_base, fn,
+ strlen(git_replace_ref_base), 0, cb_data);
}
int head_ref_namespaced(each_ref_fn fn, void *cb_data)