aboutsummaryrefslogtreecommitdiff
path: root/pre-receive
diff options
context:
space:
mode:
Diffstat (limited to 'pre-receive')
-rwxr-xr-xpre-receive4
1 files changed, 4 insertions, 0 deletions
diff --git a/pre-receive b/pre-receive
index 4cba932..e2533da 100755
--- a/pre-receive
+++ b/pre-receive
@@ -225,6 +225,10 @@ sub read_push_options {
sub set_default_branch {
chomp ($default_branch = `git config get init.defaultBranch`);
+ if(!length($default_branch)) {
+ debug("got empty result from 'git config get init.defaultBranch', assuming 'master'");
+ $default_branch = "master";
+ }
debug("default branch is '$default_branch'");
}