]> git.ipfire.org Git - thirdparty/git.git/commit
t4108: remove git command upstream of pipe
authorDenton Liu <liu.denton@gmail.com>
Wed, 23 Oct 2019 23:32:31 +0000 (16:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Oct 2019 02:32:53 +0000 (11:32 +0900)
commitb0069684d430ea67fd3fbe019c71a18d4ef87fa3
tree4f019ee589f7d9da4b0944f67a8dee88fee82057
parentfa87b813853b12fee2a931c6084134fe1eea3b55
t4108: remove git command upstream of pipe

Before, the output of `git diff HEAD` would always be piped to
sanitize_conflicted_diff(). However, since the Git command was upstream
of the pipe, in case the Git command fails, the return code would be
lost. Rewrite into separate statements so that the return code is no
longer lost.

Since only the command `git diff HEAD` was being piped to
sanitize_conflicted_diff(), move the command into the function and rename
it to print_sanitized_conflicted_diff().

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4108-apply-threeway.sh