path: root/strbuf.h
diff options
authorJunio C Hamano <>2009-03-21 20:17:30 (GMT)
committerJunio C Hamano <>2009-03-23 06:44:08 (GMT)
commita552de75eb01f78046feaf7dc88e5e4833624ad5 (patch)
treed069272f15dc3876743f24ed75c43f4209c004b4 /strbuf.h
parent431b1969fcde69959a23355fba6894fb69c8fa0c (diff)
strbuf_branchname(): a wrapper for branch name shorthands
The function takes a user-supplied string that is supposed to be a branch name, and puts it in a strbuf after expanding possible shorthand notation. A handful of open coded sequence to do this in the existing code have been changed to use this helper function. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'strbuf.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 89bd36e..68923e1 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -131,4 +131,6 @@ extern int strbuf_getline(struct strbuf *, FILE *, int);
extern void stripspace(struct strbuf *buf, int skip_comments);
extern int launch_editor(const char *path, struct strbuf *buffer, const char *const *env);
+extern int strbuf_branchname(struct strbuf *sb, const char *name);
#endif /* STRBUF_H */