summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c135ee8)
raw | patch | inline | side by side (parent: c135ee8)
author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 25 Apr 2007 20:07:45 +0000 (22:07 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 26 Apr 2007 06:43:16 +0000 (23:43 -0700) |
Also leave a warning for future merge-recursive explorers.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c | patch | blob | history | |
t/t6022-merge-rename.sh | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index 37f1ba93fe943e45a984c012b31390d68fc9498c..094ac59e69779621caf2872c8b4ee14242e89357 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
if (mfi.merge && mfi.clean &&
sha_eq(mfi.sha, ren1->pair->two->sha1) &&
mfi.mode == ren1->pair->two->mode)
+ /*
+ * This messaged is part of
+ * t6022 test. If you change
+ * it update the test too.
+ */
output(3, "Skipped %s (merged same as existing)", ren1_dst);
else {
if (mfi.merge || !mfi.clean)
index b608e202c18fd545868898fcd0528c3501459b6f..e3f7ae8120aa2a46b25dd3830597cb863a5f5e20 100755 (executable)
--- a/t/t6022-merge-rename.sh
+++ b/t/t6022-merge-rename.sh
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 >A+ &&
mv A+ A &&
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 >A+ &&
+mv A+ A &&
+git commit -q -a -m "changed" &&
+
+git checkout change+rename &&
+sed -e "/^g /s/.*/g : changed line/" <A >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' \
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