]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3600: comment on inducing SIGPIPE in `git rm`
authorDenton Liu <liu.denton@gmail.com>
Wed, 27 Nov 2019 19:53:20 +0000 (11:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Nov 2019 21:20:14 +0000 (13:20 -0800)
Add a comment about intentionally inducing SIGPIPE since this is unusual
and future developers should be aware. Also, even though we are trying
to refactor git commands out of the upstream of pipes, we cannot do it
here since we rely on it being upstream to induce SIGPIPE. Comment on
that as well so that future developers do not try to change it.

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

index 0c3bf10eddf5e65c0eabdc2cf06d7ff69a65172c..0ea858d652fcb5aee58e8a71c6d68cdbcfb974ea 100755 (executable)
@@ -251,6 +251,7 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
                echo "100644 $hash 0    some-file-$i"
                i=$(( $i + 1 ))
        done | git update-index --index-info &&
+       # git command is intentionally placed upstream of pipe to induce SIGPIPE
        git rm -n "some-file-*" | : &&
        test_path_is_missing .git/index.lock
 '