summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-03-30 03:07:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-30 08:22:53 (GMT)
commit2a8177b63d39503b182248b04ffcc75e3495754c (patch)
tree3aa3fa4f7fa0fc216166c1946efe1d5d33657249 /refs.h
parenteaa759b9141f125d7e55a4b08b60497845d3c52e (diff)
downloadgit-2a8177b63d39503b182248b04ffcc75e3495754c.zip
git-2a8177b63d39503b182248b04ffcc75e3495754c.tar.gz
git-2a8177b63d39503b182248b04ffcc75e3495754c.tar.bz2
refs: add "for_each_ref_in" function to refactor "for_each_*_ref" functions
The "for_each_{tag,branch,remote,replace,}_ref" functions are redefined in terms of "for_each_ref_in" so that we can lose the hardcoded length of prefix strings from the code. Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 29bdcec..abb1257 100644
--- a/refs.h
+++ b/refs.h
@@ -20,6 +20,7 @@ struct ref_lock {
typedef int each_ref_fn(const char *refname, const unsigned char *sha1, int flags, void *cb_data);
extern int head_ref(each_ref_fn, void *);
extern int for_each_ref(each_ref_fn, void *);
+extern int for_each_ref_in(const char *, each_ref_fn, void *);
extern int for_each_tag_ref(each_ref_fn, void *);
extern int for_each_branch_ref(each_ref_fn, void *);
extern int for_each_remote_ref(each_ref_fn, void *);