Skip to content

Commit 2f13904

Browse files
artagnongitster
authored andcommitted
t3200 (branch): fix '&&' chaining
Breaks in a test assertion's && chain can potentially hide failures from earlier commands in the chain. Fix these breaks. The 'git branch --help' in the test may fail if git manual pages are not installed, but the point of the test is to make sure it does not create a bogus branch "--help", so run it under 'test_might_fail'. Helped-by: Jonathan Nieder <[email protected]> Signed-off-by: Ramkumar Ramachandra <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4cb5d10 commit 2f13904

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t3200-branch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test_expect_success \
2222

2323
test_expect_success \
2424
'git branch --help should not have created a bogus branch' '
25-
git branch --help </dev/null >/dev/null 2>/dev/null;
25+
test_might_fail git branch --help </dev/null >/dev/null 2>/dev/null &&
2626
test_path_is_missing .git/refs/heads/--help
2727
'
2828

@@ -88,7 +88,7 @@ test_expect_success \
8888
test_expect_success \
8989
'git branch -m n/n n should work' \
9090
'git branch -l n/n &&
91-
git branch -m n/n n
91+
git branch -m n/n n &&
9292
test_path_is_file .git/logs/refs/heads/n'
9393

9494
test_expect_success 'git branch -m o/o o should fail when o/p exists' '

0 commit comments

Comments
 (0)