]> git.ipfire.org Git - thirdparty/git.git/commit
t4215: use helper function to check output
authorDenton Liu <liu.denton@gmail.com>
Tue, 12 Nov 2019 18:56:22 +0000 (10:56 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Nov 2019 02:02:12 +0000 (11:02 +0900)
commitd784d978f68219774270f92f3672e0e064602c09
treea46336a85ff084f99a8d0f6a2c12f02bde1fb43a
parentbbb13e8188ee37dd3e2318752342622266659620
t4215: use helper function to check output

When git commands are placed in the upstream of a pipe, their return
codes are lost. In this particular case, it is especially bad since we
are testing the intricacies of `git log --graph` behavior and if we hit
an unexpected failure or segfault, we want to know this.

Extract the common output checking logic into check_graph() where we
redirect the output of git commands upstream of pipe into a file and
have sed read from that file so that git failures are detected.

This patch is best viewed with `--color-moved`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4215-log-skewed-merges.sh