summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorSean <seanlkml@sympatico.ca>2006-05-14 01:43:00 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-14 23:21:02 (GMT)
commita62be77f5ebdbbd46d6956dc4d07571835588389 (patch)
tree7865bc748d628ae786951067568281fc5b7158dd /refs.h
parent975bf9cf5ad5d440f98f464ae8124609a4835ce1 (diff)
downloadgit-a62be77f5ebdbbd46d6956dc4d07571835588389.zip
git-a62be77f5ebdbbd46d6956dc4d07571835588389.tar.gz
git-a62be77f5ebdbbd46d6956dc4d07571835588389.tar.bz2
Add "--branches", "--tags" and "--remotes" options to git-rev-parse.
"git branch" uses "rev-parse --all" and becomes much too slow when there are many tags (it scans all refs). Use the new "--branches" option of rev-parse to speed things up. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 2625596..fa816c1 100644
--- a/refs.h
+++ b/refs.h
@@ -7,6 +7,9 @@
*/
extern int head_ref(int (*fn)(const char *path, const unsigned char *sha1));
extern int for_each_ref(int (*fn)(const char *path, const unsigned char *sha1));
+extern int for_each_tag_ref(int (*fn)(const char *path, const unsigned char *sha1));
+extern int for_each_branch_ref(int (*fn)(const char *path, const unsigned char *sha1));
+extern int for_each_remote_ref(int (*fn)(const char *path, const unsigned char *sha1));
/** Reads the refs file specified into sha1 **/
extern int get_ref_sha1(const char *ref, unsigned char *sha1);