Skip to content

Commit 5876170

Browse files
chriscoolgitster
authored andcommitted
t6050: redirect expected error output to a file
Otherwise the error from `git rev-parse` is uselessly polluting the debug output. Redirecting to a file, instead of /dev/null, makes it possible to check that we got the error we expected, so let's check that too. Reviewed-by: Taylor Blau <[email protected]> Helped-by: Eric Sunshine <[email protected]> Helped-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 502d87b commit 5876170

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t6050-replace.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ commit_peeling_shows_parents ()
4040
test "$_found" = "$_parent" || return 1
4141
_parent_number=$(( $_parent_number + 1 ))
4242
done &&
43-
test_must_fail git rev-parse --verify $_commit^$_parent_number
43+
test_must_fail git rev-parse --verify $_commit^$_parent_number 2>err &&
44+
test_i18ngrep "Needed a single revision" err
4445
}
4546

4647
commit_has_parents ()

0 commit comments

Comments
 (0)