summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-01-23 09:06:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-01 00:02:59 (GMT)
commit292687003abcfb68d296c57d7e812b0469f74647 (patch)
tree33a749b3426d426b5db08f0b092e2192a828935a /refs.c
parentf9275c68af58e0f65e1557b5109ccbfdbbbc384a (diff)
downloadgit-292687003abcfb68d296c57d7e812b0469f74647.zip
git-292687003abcfb68d296c57d7e812b0469f74647.tar.gz
git-292687003abcfb68d296c57d7e812b0469f74647.tar.bz2
refs: add a "for_each_replace_ref" function
This is some preparation work for the following patches that are using the "refs/replace/" ref namespace. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 24438c6..6a13651 100644
--- a/refs.c
+++ b/refs.c
@@ -667,6 +667,11 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data)
return for_each_ref_in("refs/remotes/", fn, cb_data);
}
+int for_each_replace_ref(each_ref_fn fn, void *cb_data)
+{
+ return do_for_each_ref("refs/replace/", fn, 13, 0, cb_data);
+}
+
int for_each_rawref(each_ref_fn fn, void *cb_data)
{
return do_for_each_ref("refs/", fn, 0,