From: Junio C Hamano Date: Tue, 20 Dec 2011 00:05:25 +0000 (-0800) Subject: Merge branch 'rr/test-chaining' X-Git-Tag: v1.7.9-rc0~52 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9293aac2b1911abd52d08fc1e8641dc69ab8a8ad?ds=inline;hp=-c Merge branch 'rr/test-chaining' * rr/test-chaining: t3401: use test_commit in setup t3401: modernize style t3040 (subprojects-basic): fix '&&' chaining, modernize style t1510 (worktree): fix '&&' chaining t3030 (merge-recursive): use test_expect_code test: fix '&&' chaining t3200 (branch): fix '&&' chaining --- 9293aac2b1911abd52d08fc1e8641dc69ab8a8ad diff --combined t/t3200-branch.sh index 76903323af,724ff9de4b..ea82424e47 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@@ -22,7 -22,7 +22,7 @@@ test_expect_success test_expect_success \ 'git branch --help should not have created a bogus branch' ' - git branch --help /dev/null 2>/dev/null; + test_might_fail git branch --help /dev/null 2>/dev/null && test_path_is_missing .git/refs/heads/--help ' @@@ -88,7 -88,7 +88,7 @@@ test_expect_success test_expect_success \ 'git branch -m n/n n should work' \ 'git branch -l n/n && - git branch -m n/n n + git branch -m n/n n && test_path_is_file .git/logs/refs/heads/n' test_expect_success 'git branch -m o/o o should fail when o/p exists' ' @@@ -115,22 -115,6 +115,22 @@@ test_expect_success 'git branch -M baz git branch -M baz bam ' +test_expect_success 'git branch -M master should work when master is checked out' ' + git checkout master && + git branch -M master +' + +test_expect_success 'git branch -M master master should work when master is checked out' ' + git checkout master && + git branch -M master master +' + +test_expect_success 'git branch -M master2 master2 should work when master is checked out' ' + git checkout master && + git branch master2 && + git branch -M master2 master2 +' + test_expect_success 'git branch -v -d t should work' ' git branch t && test_path_is_file .git/refs/heads/t &&