]> git.ipfire.org Git - thirdparty/git.git/commit - t/t4014-format-patch.sh
t4014: stop losing return codes of git commands
authorDenton Liu <liu.denton@gmail.com>
Tue, 27 Aug 2019 04:05:15 +0000 (00:05 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Sep 2019 19:58:52 +0000 (12:58 -0700)
commit854b5cb46af2281f54038804121a89381169f420
tree882954e6735e432c35acca78e8df044095d4b7d8
parentdd2b6b6860e5955323057b7f97f627f686a3b0d9
t4014: stop losing return codes of git commands

Currently, there are two ways where the return codes of Git commands are
lost. The first way is when a command is in the upstream of a pipe. In a
pipe, only the return code of the last command is used. Thus, all other
commands will have their return codes masked. Rewrite pipes so that
there are no Git commands upstream.

The other way is when a command is in a non-assignment subshell. The
return code will be lost in favour of the surrounding command's. Rewrite
instances of this such that Git commands output to a file and
surrounding commands only call subshells with non-Git commands.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4014-format-patch.sh