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 <j6t@kdbg.org> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Sixt committed Sep 5, 2016 at 21:00 UTC c00bfc9d1be8ae45c4d321b1cb02f146ce670f33
1 file changed +1 -1
t/t9903-bash-prompt.sh
+1 -1
@@ -177,7 +177,7 @@ test_expect_success 'prompt - interactive rebase' '
177 git checkout b1 &&
178 test_when_finished "git checkout master" &&
179 git rebase -i HEAD^ &&
180 - test_when_finished "git rebase --abort"
180 + test_when_finished "git rebase --abort" &&
181 __git_ps1 >"$actual" &&
182 test_cmp expected "$actual"
183 '