summaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-12-12 21:49:50 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-12-12 21:49:50 -0800
commit6758af89e4bf3f767e189da3e09c3c939162872d (patch)
treed0f25a4cd8c831949748fe9334aaad595e225cd1 /t/t3200-branch.sh
parentRelnotes: remove items fixed on 'maint' (diff)
parentupdate-index -h: show usage even with corrupt index (diff)
downloadtgif-6758af89e4bf3f767e189da3e09c3c939162872d.tar.xz
Merge branch 'jn/git-cmd-h-bypass-setup'
* jn/git-cmd-h-bypass-setup: update-index -h: show usage even with corrupt index merge -h: show usage even with corrupt index ls-files -h: show usage even with corrupt index gc -h: show usage even with broken configuration commit/status -h: show usage even with broken configuration checkout-index -h: show usage even in an invalid repository branch -h: show usage even in an invalid repository Conflicts: builtin/merge.c
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index f54a533456..f308235f5d 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'