diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t0001-init.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 1edd5aeb8f..386c06b5dd 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -464,4 +464,17 @@ test_expect_success MINGW 'redirect std handles' ' grep "Needed a single revision" output.txt ' +test_expect_success '--initial-branch' ' + git init --initial-branch=hello initial-branch-option && + git -C initial-branch-option symbolic-ref HEAD >actual && + echo refs/heads/hello >expect && + test_cmp expect actual && + + : re-initializing should not change the branch name && + git init --initial-branch=ignore initial-branch-option 2>err && + test_i18ngrep "ignored --initial-branch" err && + git -C initial-branch-option symbolic-ref HEAD >actual && + grep hello actual +' + test_done |