aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.h
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2016-06-25 22:49:35 +0100
committerRichard Maw <richard.maw@gmail.com>2016-07-13 20:09:37 +0100
commit5817a8f70370c0d41950fb2e7516389866da89b7 (patch)
tree27540f4f14d49d77dbe88287ac1e4efc95e66fa1 /cgit.h
parentGuess the default branch based on current namespace (diff)
downloadcgit-5817a8f70370c0d41950fb2e7516389866da89b7.tar.xz
cgit-5817a8f70370c0d41950fb2e7516389866da89b7.zip
Add cgit_for_each_namespaced_ref_in helper
libgit has a for_each_namespaced_ref, but lacks equivalents for just branches, tags or remotes. Rather than implementing all of those helpers, it's more convenient to implement just one that prepends the namespace to the provided ref base. Signed-off-by: Richard Maw <richard.maw@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 93de0ea..f0d25d6 100644
--- a/cgit.h
+++ b/cgit.h
@@ -394,4 +394,6 @@ extern char *get_mimetype_for_filename(const char *filename);
extern int cgit_get_sha1(const char *name, unsigned char *sha1);
+extern int cgit_for_each_namespaced_ref_in(const char *prefix, each_ref_fn fn, void *cb_data);
+
#endif /* CGIT_H */