Skip to content

Commit 7a45a66

Browse files
bwijendscho
authored andcommitted
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 <[email protected]>
1 parent b7f7626 commit 7a45a66

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/t6026-merge-attr.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,19 @@ test_expect_success 'up-to-date merge without common ancestor' '
181181
)
182182
'
183183

184+
test_expect_success 'custom merge does not lock index' '
185+
git reset --hard anchor &&
186+
187+
write_script sleep-one-second.sh <<-\EOF &&
188+
sleep 1 &
189+
EOF
190+
191+
printf "* merge=ours\ntext merge=sleep-one-second\n" >.gitattributes &&
192+
193+
git config merge.ours.driver "true" &&
194+
git config merge.sleep-one-second.driver "./sleep-one-second.sh" &&
195+
196+
git merge master
197+
'
198+
184199
test_done

0 commit comments

Comments
 (0)