Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-08-15 20:19:47 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-15 20:19:47 +0300
commitf9fe84b5a2a4055fdc2d272e3593c3f91db41626 (patch)
treee9ff9898f33345a9937bd25378cd57e06287d39e
parent8e12aaa7ceb83c9229b392079ed9e38c36e82b81 (diff)
parente5cb1e3f093986815945b85e61de112b8e3ccdd6 (diff)
Merge branch 'pw/diff-no-index-from-named-pipes'
Test updates. * pw/diff-no-index-from-named-pipes: t4053: avoid writing to unopened pipe t4053: avoid race when killing background processes
-rwxr-xr-xt/t4053-diff-no-index.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh
index a28b9ff243..6781cc9078 100755
--- a/t/t4053-diff-no-index.sh
+++ b/t/t4053-diff-no-index.sh
@@ -232,10 +232,6 @@ test_expect_success 'diff --no-index refuses to diff stdin and a directory' '
test_expect_success PIPE 'diff --no-index refuses to diff a named pipe and a directory' '
test_when_finished "rm -f pipe" &&
mkfifo pipe &&
- {
- (>pipe) &
- } &&
- test_when_finished "kill $!" &&
test_must_fail git diff --no-index -- pipe a 2>err &&
grep "fatal: cannot compare a named pipe to a directory" err
'
@@ -248,11 +244,11 @@ test_expect_success PIPE,SYMLINKS 'diff --no-index reads from pipes' '
{
(test_write_lines a b c >old) &
} &&
- test_when_finished "! kill $!" &&
+ test_when_finished "kill $! || :" &&
{
(test_write_lines a x c >new) &
} &&
- test_when_finished "! kill $!" &&
+ test_when_finished "kill $! || :" &&
cat >expect <<-EOF &&
diff --git a/old b/new-link