Skip to content

Commit f9fe84b

Browse files
committed
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
2 parents 8e12aaa + e5cb1e3 commit f9fe84b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

t/t4053-diff-no-index.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ test_expect_success 'diff --no-index refuses to diff stdin and a directory' '
232232
test_expect_success PIPE 'diff --no-index refuses to diff a named pipe and a directory' '
233233
test_when_finished "rm -f pipe" &&
234234
mkfifo pipe &&
235-
{
236-
(>pipe) &
237-
} &&
238-
test_when_finished "kill $!" &&
239235
test_must_fail git diff --no-index -- pipe a 2>err &&
240236
grep "fatal: cannot compare a named pipe to a directory" err
241237
'
@@ -248,11 +244,11 @@ test_expect_success PIPE,SYMLINKS 'diff --no-index reads from pipes' '
248244
{
249245
(test_write_lines a b c >old) &
250246
} &&
251-
test_when_finished "! kill $!" &&
247+
test_when_finished "kill $! || :" &&
252248
{
253249
(test_write_lines a x c >new) &
254250
} &&
255-
test_when_finished "! kill $!" &&
251+
test_when_finished "kill $! || :" &&
256252
257253
cat >expect <<-EOF &&
258254
diff --git a/old b/new-link

0 commit comments

Comments
 (0)