summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t0001-init.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 386c06b5dd..6d2467995e 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -477,4 +477,17 @@ test_expect_success '--initial-branch' '
grep hello actual
'
+test_expect_success 'overridden default initial branch name (config)' '
+ test_config_global init.defaultBranch nmb &&
+ git init initial-branch-config &&
+ git -C initial-branch-config symbolic-ref HEAD >actual &&
+ grep nmb actual
+'
+
+test_expect_success 'invalid default branch name' '
+ test_config_global init.defaultBranch "with space" &&
+ test_must_fail git init initial-branch-invalid 2>err &&
+ test_i18ngrep "invalid branch name" err
+'
+
test_done