From ebb0d647db37eea7ae14fc3441069896f165796c Mon Sep 17 00:00:00 2001 From: Ben Wijen Date: Thu, 26 May 2016 08:57:26 +0200 Subject: [PATCH] Add index.lock test to t/t6026-merge-attr.sh This test was added to verify the behaviour of merge when a merge server is spawned. Because file handles are inherited by child processes, the index.lock is also inherited and - on win32 - can't be released until the child has stopped. Signed-off-by: Ben Wijen --- t/t6026-merge-attr.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh index ef0cbceafe..9be8119008 100755 --- a/t/t6026-merge-attr.sh +++ b/t/t6026-merge-attr.sh @@ -181,4 +181,19 @@ test_expect_success 'up-to-date merge without common ancestor' ' ) ' +test_expect_success 'custom merge does not lock index' ' + git reset --hard anchor && + + write_script sleep-one-second.sh <<-\EOF && + sleep 1 & + EOF + + printf "* merge=ours\ntext merge=sleep-one-second\n" >.gitattributes && + + git config merge.ours.driver "true" && + git config merge.sleep-one-second.driver "./sleep-one-second.sh" && + + git merge master +' + test_done