Skip to content

Commit 9c51e88

Browse files
committed
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 eea2ae1 commit 9c51e88

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
@@ -180,4 +180,19 @@ test_expect_success 'up-to-date merge without common ancestor' '
180180
)
181181
'
182182

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

0 commit comments

Comments
 (0)