X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft6022-merge-rename.sh;h=e3f7ae8120aa2a46b25dd3830597cb863a5f5e20;hb=e9c34c233f2e838c334f6e8a807ebc6a988e9509;hp=b608e202c18fd545868898fcd0528c3501459b6f;hpb=6a96b32d3b045c6e8d1b553fd6b64e03db9b0e45;p=git.git
diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh
index b608e202c..e3f7ae812 100755
--- a/t/t6022-merge-rename.sh
+++ b/t/t6022-merge-rename.sh
@@ -47,6 +47,8 @@ git branch white &&
git branch red &&
git branch blue &&
git branch yellow &&
+git branch change &&
+git branch change+rename &&
sed -e "/^g /s/.*/g : master changes a line/" A+ &&
mv A+ A &&
@@ -77,6 +79,17 @@ rm -f A M &&
git update-index --add --remove A C M N &&
git commit -m "blue renames A->C, M->N" &&
+git checkout change &&
+sed -e "/^g /s/.*/g : changed line/" A+ &&
+mv A+ A &&
+git commit -q -a -m "changed" &&
+
+git checkout change+rename &&
+sed -e "/^g /s/.*/g : changed line/" B &&
+rm A &&
+git update-index --add B &&
+git commit -q -a -m "changed and renamed" &&
+
git checkout master'
test_expect_success 'pull renaming branch into unrenaming one' \
@@ -318,4 +331,14 @@ test_expect_success 'interference with untracked working tree file' '
git reset --hard anchor
'
+test_expect_success 'merge of identical changes in a renamed file' '
+ rm -f A M N
+ git reset --hard &&
+ git checkout change+rename &&
+ GIT_MERGE_VERBOSITY=3 git merge change | grep "^Skipped B" &&
+ git reset --hard HEAD^ &&
+ git checkout change &&
+ GIT_MERGE_VERBOSITY=3 git merge change+rename | grep "^Skipped B"
+'
+
test_done