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

[PATCH] t7606: Avoid using head as a file name

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Aug 23, 2010, 20:15 UTC
Message-ID
<1282594547-78944-1-git-send-email-brian@gernhardtsoftware.com>

A file named 'head' gets confused with the HEAD ref on case-insensitive file systems. Replace '>head' with '>head.new' to match the '>head.old' files they are compared to.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
 t/t7606-merge-custom.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t7606-merge-custom.sh b/t/t7606-merge-custom.sh
index 13c2193..8e8c4d7 100755
--- a/t/t7606-merge-custom.sh
+++ b/t/t7606-merge-custom.sh
@@ -46,7 +46,7 @@ test_expect_success 'merge c2 with a custom strategy' '
 	git rev-parse c2^{tree} >tree.expected &&
 	git merge -s theirs c2 &&
 
-	git rev-parse HEAD >head &&
+	git rev-parse HEAD >head.new &&
 	git rev-parse HEAD^1 >first-parent &&
 	git rev-parse HEAD^2 >second-parent &&
 	git rev-parse HEAD^{tree} >tree &&
@@ -55,7 +55,7 @@ test_expect_success 'merge c2 with a custom strategy' '
 	git diff --exit-code c2 HEAD &&
 	git diff --exit-code c2 &&
 
-	! test_cmp head.old head &&
+	! test_cmp head.old head.new &&
 	test_cmp head.old first-parent &&
 	test_cmp second-parent.expected second-parent &&
 	test_cmp tree.expected tree &&
@@ -72,7 +72,7 @@ test_expect_success 'trivial merge with custom strategy' '
 	git rev-parse c3^{tree} >tree.expected &&
 	git merge -s theirs c3 &&
 
-	git rev-parse HEAD >head &&
+	git rev-parse HEAD >head.new &&
 	git rev-parse HEAD^1 >first-parent &&
 	git rev-parse HEAD^2 >second-parent &&
 	git rev-parse HEAD^{tree} >tree &&
@@ -81,7 +81,7 @@ test_expect_success 'trivial merge with custom strategy' '
 	git diff --exit-code c3 HEAD &&
 	git diff --exit-code c3 &&
 
-	! test_cmp head.old head &&
+	! test_cmp head.old head.new &&
 	test_cmp head.old first-parent &&
 	test_cmp second-parent.expected second-parent &&
 	test_cmp tree.expected tree &&
-- 
1.7.2.2.399.g628fd
Next: Jonathan Nieder
Message 1 of 2 in “t7606: Avoid using head as a file name”
  1. t7606: Avoid using head as a file nameBrian Gernhardt, Aug 23, 2010
  2. Jonathan NiederAug 23, 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.