t6022: don't run 'git merge' upstream of a pipe

The primary purpose of 't6022-merge-rename.sh' is to test 'git merge', but one of the tests runs it upstream of a pipe, hiding its exit code. Consequently, the test could continue even if 'git merge' exited with error. Use an intermediate file between 'git merge' and 'test_i18ngrep' to catch a potential failure of the former. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

SZEDER Gábor committed Feb 8, 2018 at 16:56 UTC cc04adc2d0514f0f666b7e123ba2022b1a20dcde
1 file changed +4 -2
t/t6022-merge-rename.sh
+4 -2
@@ -242,10 +242,12 @@ test_expect_success 'merge of identical changes in a renamed file' '
242 rm -f A M N &&
243 git reset --hard &&
244 git checkout change+rename &&
245 - GIT_MERGE_VERBOSITY=3 git merge change | test_i18ngrep "^Skipped B" &&
245 + GIT_MERGE_VERBOSITY=3 git merge change >out &&
246 + test_i18ngrep "^Skipped B" out &&
247 git reset --hard HEAD^ &&
248 git checkout change &&
248 - GIT_MERGE_VERBOSITY=3 git merge change+rename | test_i18ngrep "^Skipped B"
249 + GIT_MERGE_VERBOSITY=3 git merge change+rename >out &&
250 + test_i18ngrep "^Skipped B" out
251 '
252
253 test_expect_success 'setup for rename + d/f conflicts' '