subtree: more consistent error propagation
commitd2f0f819547de35ffc923fc963f806f1656eb2ca
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:31 +0000 (27 15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:17 +0000 (28 16:47 +0900)
treeaf0de509be26353df62ecf4848dcefe8ac3a38cc
parent5a3569774f7b6dcdbdf470ae1e40367200d987ec
subtree: more consistent error propagation

Ensure that every $(subshell) that calls a function (as opposed to an
external executable) is followed by `|| exit $?`.  Similarly, ensure that
every `cmd | while read; do ... done` loop is followed by `|| exit $?`.

Both of those constructs mean that it can miss `die` calls, and keep
running when it shouldn't.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh