Skip to content

Commit c00bfc9

Browse files
j6tgitster
authored andcommitted
t9903: fix broken && chain
We might wonder why our && chain check does not catch this case: The && chain check uses a strange exit code with the expectation that the second or later part of a broken && chain would not exit with this particular code. This expectation does not work in this case because __git_ps1, being the first command in the second part of the broken && chain, records the current exit code, does its work, and finally returns to the caller with the recorded exit code. This fools our && chain check. Signed-off-by: Johannes Sixt <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e0c1cea commit c00bfc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t9903-bash-prompt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ test_expect_success 'prompt - interactive rebase' '
177177
git checkout b1 &&
178178
test_when_finished "git checkout master" &&
179179
git rebase -i HEAD^ &&
180-
test_when_finished "git rebase --abort"
180+
test_when_finished "git rebase --abort" &&
181181
__git_ps1 >"$actual" &&
182182
test_cmp expected "$actual"
183183
'

0 commit comments

Comments
 (0)