summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2016-09-05 21:00:47 +0200
committerJunio C Hamano <gitster@pobox.com>2016-09-07 11:35:08 -0700
commitc00bfc9d1be8ae45c4d321b1cb02f146ce670f33 (patch)
tree2f3a30997c6ce969ef7de8aa54bc75e7061e4f10
parente0c1ceafc5bece92d35773a75fff59497e1d9bd5 (diff)
downloadgit-js/t9903-chaining.tar.gz
t9903: fix broken && chainjs/t9903-chaining
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>
-rwxr-xr-xt/t9903-bash-prompt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 0db4469c89..97c9b32c2e 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -177,7 +177,7 @@ test_expect_success 'prompt - interactive rebase' '
git checkout b1 &&
test_when_finished "git checkout master" &&
git rebase -i HEAD^ &&
- test_when_finished "git rebase --abort"
+ test_when_finished "git rebase --abort" &&
__git_ps1 >"$actual" &&
test_cmp expected "$actual"
'