git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/5] Add another rename + D/F conflict testcase

From
newren@gmail.com <newren@gmail.com>
Date
Jun 29, 2010, 01:12 UTC
Message-ID
<1277773936-12412-3-git-send-email-newren@gmail.com>
In-Reply-To
<1277773936-12412-1-git-send-email-newren@gmail.com>
From: Alexander Gladysh <agladysh@gmail.com>

This is a simple testcase where both sides of the rename are paths involved in (separate) D/F merge conflicts. --- I hope it's not bad style to take someone else's testcase from the mailing list and submit it on their behalf as a testsuite addition (nor do I know what to do about the signed-off-by line in this case). This is simply the testcase Alexander Gladysh posted to the list on March 8. I really like his example due to how it serves as a simple case where there are two D/F conflicts with a rename across paths involved in both of those D/F conflicts.

I'm trying to submit this with Alexander listed as the author, but I'm not sure how to preserve that when using git-send-email.

 t/t6020-merge-df.sh |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/t/t6020-merge-df.sh b/t/t6020-merge-df.sh
index e71c687..99acb89 100755
--- a/t/t6020-merge-df.sh
+++ b/t/t6020-merge-df.sh
@@ -45,4 +45,36 @@ test_expect_failure 'F/D conflict' '
 	git merge master
 '
 
+test_expect_success 'Setup rename across paths each below D/F conflicts' '
+	git symbolic-ref HEAD refs/heads/newmaster &&
+	rm .git/index &&
+	git clean -fdx &&
+
+	mkdir a &&
+	touch a/f &&
+	git add a &&
+	git commit -m "a" &&
+
+	mkdir b &&
+	ln -s ../a b/a &&
+	git add b &&
+	git commit -m "b" &&
+
+	git checkout -b branch &&
+	rm b/a &&
+	mv a b/ &&
+	ln -s b/a a &&
+	git add . &&
+	git commit -m "swap" &&
+
+	touch f1 &&
+	git add f1 &&
+	git commit -m "f1"
+'
+
+test_expect_failure 'Test rename across paths below D/F conflicts' '
+	git checkout newmaster &&
+	git cherry-pick branch
+'
+
 test_done
-- 
1.7.2.rc0.212.g0c601
Previous: newren@gmail.comNext: Alexander Gladysh
Message 3 of 13 in “D/F conflict fixes”
  1. 0/5 D/F conflict fixesnewren@gmail.com, Jun 29, 2010
  2. 1/5 Add additional testcases for D/F conflictsnewren@gmail.com, Jun 29, 2010
  3. 2/5 Add another rename + D/F conflict testcasenewren@gmail.com, Jun 29, 2010
  4. Alexander GladyshJun 29, 2010
  5. 3/5 merge-recursive: Fix D/F conflictsnewren@gmail.com, Jun 29, 2010
  6. 4/5 merge_recursive: Fix renames across paths below D/F conflictsnewren@gmail.com, Jun 29, 2010
  7. Miklos VajnaJun 29, 2010
  8. Elijah NewrenJun 29, 2010
  9. Alex RiesenJun 29, 2010
  10. Elijah NewrenJun 29, 2010
  11. Miklos VajnaJun 29, 2010
  12. Alex RiesenJun 30, 2010
  13. 5/5 fast-import: Handle directories changing into symlinksnewren@gmail.com, Jun 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.