diff mbox series

[11/16] t3419: stop losing return code of git command

Message ID a47c218392c0e91d8faf6def0bbf1197f686af3f.1577454401.git.liu.denton@gmail.com (mailing list archive)
State New, archived
Headers show
Series t: replace incorrect test_must_fail usage (part 2) | expand

Commit Message

Denton Liu Dec. 27, 2019, 1:47 p.m. UTC
We had an instance of a git command in a non-assignment command
substitution. Its return code was lost so we would not be able to detect
if the command failed for some reason. Since we were testing to make
sure the output of the command was empty, rewrite it in a more canonical
way.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 t/t3419-rebase-patch-id.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh
index 49f548cdb9..94552669ae 100755
--- a/t/t3419-rebase-patch-id.sh
+++ b/t/t3419-rebase-patch-id.sh
@@ -80,7 +80,8 @@  do_tests () {
 		git commit -q -m "change big file again" &&
 		git checkout -q other^{} &&
 		git rebase master &&
-		test_must_fail test -n "$(git rev-list master...HEAD~)"
+		git rev-list master...HEAD~ >revs &&
+		test_must_be_empty revs
 	'
 
 	test_expect_success $pr 'do not drop patch' '