]> git.ipfire.org Git - thirdparty/git.git/commit
t5703: stop losing return codes of git commands
authorDenton Liu <liu.denton@gmail.com>
Wed, 27 Nov 2019 19:53:38 +0000 (11:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Nov 2019 21:20:15 +0000 (13:20 -0800)
commit763b47bafab6f781dc52461985b3300d447d1332
tree7b8d8c808406aedce8c04446fe9fd212d6e647f6
parenteacaa1c18096e96c391c1246e91c43f35834e49e
t5703: 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 command
substitution. The return code will be lost in favour of the surrounding
command's. Rewrite instances of this such that git commands are in an
assignment-only command substitution.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5703-upload-pack-ref-in-want.sh