mirror of
https://github.com/git/git.git
synced 2026-03-13 02:13:24 +01:00
Merge branch 'en/d-f-conflict-fix' into next
* en/d-f-conflict-fix: merge-recursive: Fix multiple file rename across D/F conflict t6031: Add a testcase covering multiple renames across a D/F conflict merge-recursive: Fix typo
This commit is contained in:
@@ -1018,8 +1018,9 @@ static int process_renames(struct merge_options *o,
|
||||
if (mfi.clean &&
|
||||
sha_eq(mfi.sha, ren1->pair->two->sha1) &&
|
||||
mfi.mode == ren1->pair->two->mode) {
|
||||
int i;
|
||||
/*
|
||||
* This messaged is part of
|
||||
* This message is part of
|
||||
* t6022 test. If you change
|
||||
* it update the test too.
|
||||
*/
|
||||
|
||||
@@ -57,4 +57,35 @@ test_expect_success FILEMODE 'verify executable bit on file' '
|
||||
test -x file2
|
||||
'
|
||||
|
||||
test_expect_success 'merging with triple rename across D/F conflict' '
|
||||
git reset --hard HEAD &&
|
||||
git checkout -b main &&
|
||||
git rm -rf . &&
|
||||
|
||||
echo "just a file" >sub1 &&
|
||||
mkdir -p sub2 &&
|
||||
echo content1 >sub2/file1 &&
|
||||
echo content2 >sub2/file2 &&
|
||||
echo content3 >sub2/file3 &&
|
||||
mkdir simple &&
|
||||
echo base >simple/bar &&
|
||||
git add -A &&
|
||||
test_tick &&
|
||||
git commit -m base &&
|
||||
|
||||
git checkout -b other &&
|
||||
echo more >>simple/bar &&
|
||||
test_tick &&
|
||||
git commit -a -m changesimplefile &&
|
||||
|
||||
git checkout main &&
|
||||
git rm sub1 &&
|
||||
git mv sub2 sub1 &&
|
||||
test_tick &&
|
||||
git commit -m changefiletodir &&
|
||||
|
||||
test_tick &&
|
||||
git merge other
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user