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 <gitster@pobox.com>
This commit is contained in:
2
strbuf.h
2
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 */
|
||||
|
Reference in New Issue
Block a user