[PATCH v2] guess default branch from HEAD
Julius Plenz
plenz at cis.fu-berlin.de
Thu Apr 7 12:49:58 CEST 2011
Hi, Lars!
* Lars Hjemli <hjemli at gmail.com> [2011-04-07 11:46]:
> This seems like a workable solution, but with two issues:
> * The feature only works for repos added by scan-path
> * I prefer to declare variables at the start of the function
I did some simple refactoring. See attached patch.
There is a function guess_defbranch now, which in any case returns a
char* (which is "master" in fallthrough cases). So you can use it in
any place you like.
Julius
More information about the CGit
mailing list