Skip to content

Commit

Permalink
t6026-merge-attr: clean up background process at end of test case
Browse files Browse the repository at this point in the history
The process spawned in the hook uses the test's trash directory as CWD.
As long as it is alive, the directory cannot be removed on Windows.
Although the test succeeds, the 'test_done' that follows produces an
error message and leaves the trash directory around. Kill the process
before the test case advances.

Helped-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Sixt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
j6t authored and gitster committed Sep 7, 2016
1 parent 6ebdac1 commit 5babb5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/t6026-merge-attr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' '
git reset --hard anchor &&
write_script sleep-one-second.sh <<-\EOF &&
sleep 1 &
echo $! >sleep.pid
EOF
test_when_finished "kill \$(cat sleep.pid)" &&
test_write_lines >.gitattributes \
"* merge=ours" "text merge=sleep-one-second" &&
Expand Down

0 comments on commit 5babb5b

Please sign in to comment.