summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorHeiko Voigt <hvoigt@hvoigt.net>2010-07-07 13:39:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-07 16:48:33 (GMT)
commit9ef6aeb09ffe0650ca86dca53de93fd85333b02d (patch)
treec3450951b7d3eb0d0bee8ff77229a98255bb4d34 /refs.h
parent0bad611b1ebacf170976a10690bd0169f8d372bf (diff)
downloadgit-9ef6aeb09ffe0650ca86dca53de93fd85333b02d.zip
git-9ef6aeb09ffe0650ca86dca53de93fd85333b02d.tar.gz
git-9ef6aeb09ffe0650ca86dca53de93fd85333b02d.tar.bz2
setup_revisions(): Allow walking history in a submodule
By passing the path to a submodule in opt->submodule, the function can be used to walk history in the named submodule repository, instead of the toplevel repository. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 762ce50..5e7a9a5 100644
--- a/refs.h
+++ b/refs.h
@@ -28,6 +28,14 @@ extern int for_each_replace_ref(each_ref_fn, void *);
extern int for_each_glob_ref(each_ref_fn, const char *pattern, void *);
extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char* prefix, void *);
+extern int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
+extern int for_each_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
+extern int for_each_ref_in_submodule(const char *submodule, const char *prefix,
+ each_ref_fn fn, void *cb_data);
+extern int for_each_tag_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
+extern int for_each_branch_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
+extern int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
+
static inline const char *has_glob_specials(const char *pattern)
{
return strpbrk(pattern, "?*[");