t4012: Break up pipe into serial redirections

Do not hide possible git errors by masking its process
exit status.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alexander Strasser 2012-07-16 22:44:30 +02:00 коммит произвёл Junio C Hamano
Родитель 4a2b716e22
Коммит 4220afd723
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -64,7 +64,8 @@ test_expect_success 'apply --numstat understands diff --binary format' '
# apply needs to be able to skip the binary material correctly
# in order to report the line number of a corrupt patch.
test_expect_success 'apply detecting corrupt patch correctly' '
git diff | sed -e "s/-CIT/xCIT/" >broken &&
git diff >output &&
sed -e "s/-CIT/xCIT/" <output >broken &&
if git apply --stat --summary broken 2>detected
then
echo unhappy - should have detected an error