X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3200-branch.sh;h=f308235f5dd28da2c19d91dc63803312aacd2cda;hb=178e1deaae33f879ea687e85ac72455b3072b0d8;hp=f54a533456d74a3eb2f745dbc77c8ad5a5ae960f;hpb=3d045897585c4b1ca0dce6bb5a33331f1b48c2bf;p=git.git diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index f54a53345..f308235f5 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -26,6 +26,17 @@ test_expect_success \ ! test -f .git/refs/heads/--help ' +test_expect_success 'branch -h in broken repository' ' + mkdir broken && + ( + cd broken && + git init && + >.git/refs/heads/master && + test_expect_code 129 git branch -h >usage 2>&1 + ) && + grep "[Uu]sage" broken/usage +' + test_expect_success \ 'git branch abc should create a branch' \ 'git branch abc && test -f .git/refs/heads/abc'