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

[PATCH 2/2] Add tests for cherry-pick d/f conflict which should be none

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 17, 2007, 17:14 UTC
Message-ID
<Pine.LNX.4.64.0707171814330.14781@racer.site>
In-Reply-To
<7v8x9q1x5t.fsf@assigned-by-dhcp.cox.net>

This tests that we fixed the problem when a directory was renamed, and a symlink was added in its place (or for that matter, if the type changed in one branch, and the name in another).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	The last test checks that also a file/symlink conflict does
	not break cherry-pick, if one side had a clean rename.
 t/t3502-cherry-pick.sh |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100755 t/t3502-cherry-pick.sh
diff --git a/t/t3502-cherry-pick.sh b/t/t3502-cherry-pick.sh
new file mode 100755
index 0000000..9921de5
--- /dev/null
+++ b/t/t3502-cherry-pick.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+test_description='test cherry-pick'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+	echo foo > file &&
+	ln -s dangling link &&
+	git add file link &&
+	test_tick &&
+	git commit -m foo &&
+	git checkout -b branch &&
+	git rm link &&
+	test_tick &&
+	git commit -m "remove link" &&
+	mkdir link &&
+	echo bar > link/file &&
+	git add link/file &&
+	test_tick &&
+	git commit -m "add dir" &&
+	echo bar > file &&
+	git commit -m "change file" file &&
+	git checkout master
+'
+
+test_expect_success 'cherry-pick ignores unrelated dir/symlink conflict' '
+	git cherry-pick branch
+'
+
+test_expect_success 'cherry-pick ignores unrelated file/symlink conflict' '
+	git checkout -b branch2 master^ &&
+	git rm link &&
+	test_tick &&
+	git commit -m "remove link" &&
+	: > link &&
+	git add link &&
+	test_tick &&
+	git commit -m "add file" &&
+	git cherry-pick master
+'
+
+test_done
-- 
1.5.3.rc1.16.g9d6f-dirty
Previous: Gerrit PapeNext: Johannes Schindelin
Message 22 of 23 in “unexpected git-cherry-pick conflict”
  1. Gerrit PapeJun 13, 2007
  2. Johannes SchindelinJun 13, 2007
  3. Gerrit PapeJun 13, 2007
  4. Johannes SchindelinJun 13, 2007
  5. Gerrit PapeJun 25, 2007
  6. Johannes SchindelinJun 25, 2007
  7. Johannes SchindelinJul 7, 2007
  8. Gerrit PapeDec 21, 2007
  9. Junio C HamanoDec 22, 2007
  10. merge-tree: sometimes, d/f conflict is not an issueJohannes Schindelin, Jul 8, 2007
  11. Junio C HamanoJul 8, 2007
  12. Johannes SchindelinJul 8, 2007
  13. Johannes SchindelinJul 8, 2007
  14. Johannes SchindelinJul 8, 2007
  15. Junio C HamanoJul 8, 2007
  16. Junio C HamanoJul 8, 2007
  17. Johannes SchindelinJul 8, 2007
  18. Junio C HamanoJul 8, 2007
  19. merge-one-file, was Re: [PATCH] merge-tree: sometimes, d/f conflict is not an issueJohannes Schindelin, Jul 9, 2007
  20. 1/2 merge-recursive: sometimes, d/f conflict is not an issueJohannes Schindelin, Jul 17, 2007
  21. Gerrit PapeAug 8, 2007
  22. 2/2 Add tests for cherry-pick d/f conflict which should be noneJohannes Schindelin, Jul 17, 2007
  23. Johannes SchindelinJul 8, 2007

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.