Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Mishra <shivam828787@gmail.com>2022-03-12 09:21:25 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-13 03:22:01 +0300
commit9b6d1fc48a29abdd49c267ce1bf06bac5151a0e4 (patch)
tree3d9b60799bcb86c478241e7330414c0db2012800 /t/t0025-crlf-renormalize.sh
parentae5d569bb22ea4e889c9a2da757ed0c253ec1fc1 (diff)
t0001-t0028: avoid pipes with Git on LHS
Pipes ignore error codes of LHS command and thus we should not use them with Git in tests. As an alternative, use a 'tmp' file to write the Git output so we can test the exit code. Signed-off-by: Shubham Mishra <shivam828787@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0025-crlf-renormalize.sh')
-rwxr-xr-xt/t0025-crlf-renormalize.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0025-crlf-renormalize.sh b/t/t0025-crlf-renormalize.sh
index 81447978b7..f7202c192e 100755
--- a/t/t0025-crlf-renormalize.sh
+++ b/t/t0025-crlf-renormalize.sh
@@ -22,8 +22,8 @@ test_expect_success 'renormalize CRLF in repo' '
i/lf w/lf attr/text=auto LF.txt
i/lf w/mixed attr/text=auto CRLF_mix_LF.txt
EOF
- git ls-files --eol |
- sed -e "s/ / /g" -e "s/ */ /g" |
+ git ls-files --eol >tmp &&
+ sed -e "s/ / /g" -e "s/ */ /g" tmp |
sort >actual &&
test_cmp expect actual
'