path: root/refs.h
diff options
authorThomas Rast <>2010-03-12 17:04:26 (GMT)
committerJunio C Hamano <>2010-03-13 05:55:39 (GMT)
commit894a9d333e9e2015cad00d95250b7c5d3acea8b6 (patch)
tree2bab79483f959c7661e87ef70b1976ab9aa65bdb /refs.h
parent6ceeaee7ea5bb754c76ce93c5b289f72d69fdb92 (diff)
Support showing notes from more than one notes tree
With this patch, you can set notes.displayRef to a glob that points at your favourite notes refs, e.g., [notes] displayRef = refs/notes/* Then git-log and friends will show notes from all trees. Thanks to Junio C Hamano for lots of feedback, which greatly influenced the design of the entire series and this commit in particular. Signed-off-by: Thomas Rast <> Acked-by: Johan Herland <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index f7648b9..4a18b08 100644
--- a/refs.h
+++ b/refs.h
@@ -28,6 +28,11 @@ 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 *);
+static inline const char *has_glob_specials(const char *pattern)
+ return strpbrk(pattern, "?*[");
/* can be used to learn about broken ref and symref */
extern int for_each_rawref(each_ref_fn, void *);