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

[BUG/TEST 2/2] t3501: Expose addinfo_cache error message in cherry-pick

From
Stephen Boyd <sboyd@codeaurora.org>
Date
Feb 12, 2013, 04:27 UTC
Message-ID
<1360643262-1472-3-git-send-email-sboyd@codeaurora.org>
In-Reply-To
<1360643262-1472-1-git-send-email-sboyd@codeaurora.org>

I encountered a mysterious error message while doing some cherry-picking into a dirty tree. In this case, the working tree was dirty with changes to two files that had been renamed, we'll call them 'file and 'otherfile'. The change I wanted to cherry-pick was made along a branch before the rename to 'file'. When I cherry-picked the change from the other branch without the rename to my current branch with the rename, the change applied cleanly and the dirty bits were committed but a mysterious error message was printed indicating something went wrong with the file that was still dirty after the cherry-pick.

	error: addinfo_cache failed for path 'otherfile'

I suspect this error message shouldn't be printed, so recreate the problem in t3501 so that it can be fixed.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 t/t3501-revert-cherry-pick.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index eef4d8c..522a9fd 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -137,4 +137,36 @@ test_expect_success 'cherry-pick on dirty rename should stay dirty' '
 	! git diff --quiet
 '
 
+test_expect_success 'cherry-pick on dirty rename should not complain' '
+	git checkout initial &&
+
+	test_commit file1
+
+	for l in b c d e f g h i j k l m n o
+	do
+		echo $l$l$l$l$l$l$l$l$l
+	done >oops &&
+
+	test_tick &&
+	git add oops &&
+	git commit -m drop2 &&
+	git tag drop2 &&
+
+	git checkout file1 &&
+	test_tick &&
+	git mv oops spoo &&
+	git mv file1.t file2.t &&
+	git commit -m rename4 &&
+	git tag rename4 &&
+
+	echo file2 > file2.t &&
+	for l in b c d e f g h i j k m n o
+	do
+		echo $l$l$l$l$l$l$l$l$l
+	done >spoo &&
+
+	git cherry-pick drop2 2> errors &&
+	! test -s errors
+'
+
 test_done
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Previous: Stephen BoydNext: Stephen Boyd
Message 3 of 4 in “[BUG/TEST 0/2] bugs with cherry-pick renames”
  1. Stephen BoydFeb 12, 2013
  2. 1/2 t3501: Expose bug with cherry-pick into dirty trees w/ renamesStephen Boyd, Feb 12, 2013
  3. 2/2 t3501: Expose addinfo_cache error message in cherry-pickStephen Boyd, Feb 12, 2013
  4. Stephen BoydMar 4, 2013

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.