]> git.ipfire.org Git - thirdparty/git.git/commit
t4129: prevent loss of exit code due to the use of pipes
authorChandra Pratap <chandrapratap3519@gmail.com>
Wed, 10 Jan 2024 12:54:17 +0000 (12:54 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Jan 2024 17:24:56 +0000 (09:24 -0800)
commit1260914190ad737029de6f4f61851180a4ccce56
tree71aa981819c1f9df9fe0bde90031750d584a2595
parenta54a84b333adbecf7bc4483c0e36ed5878cac17b
t4129: prevent loss of exit code due to the use of pipes

Piping the output of git commands like git-ls-files to another
command (grep in this case) hides the exit code returned by
these commands. Prevent this by storing the output of git-ls-files
to a temporary file and then "grep-ping" from that file. Replace
grep with test_grep as the latter is more verbose when it fails.

Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4129-apply-samemode.sh