From mboxrd@z Thu Jan 1 00:00:00 1970 From: plenz at cis.fu-berlin.de (Julius Plenz) Date: Thu, 7 Apr 2011 12:49:58 +0200 Subject: [PATCH v2] guess default branch from HEAD In-Reply-To: References: <1301500806-25622-1-git-send-email-plenz@cis.fu-berlin.de> Message-ID: <20110407104958.GB1004@plenz.com> Hi, Lars! * Lars Hjemli [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