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

[PATCH] t3502: Disambiguate between file and rev by adding --

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Nov 4, 2007, 15:31 UTC
Message-ID
<20071104153126.GA61398@173.242.249.10.in-addr.arpa>

This test failed because git-diff didn't know if it was asking for the file "a" or the branch "a". Adding "--" at the end of the ambiguous commands allows the test to finish properly.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
 t/t3502-cherry-pick-merge.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh
index 3274c61..7c92e26 100755
--- a/t/t3502-cherry-pick-merge.sh
+++ b/t/t3502-cherry-pick-merge.sh
@@ -36,7 +36,7 @@ test_expect_success 'cherry-pick a non-merge with -m should fail' '
 	git reset --hard &&
 	git checkout a^0 &&
 	! git cherry-pick -m 1 b &&
-	git diff --exit-code a
+	git diff --exit-code a --
 
 '
 
@@ -45,7 +45,7 @@ test_expect_success 'cherry pick a merge without -m should fail' '
 	git reset --hard &&
 	git checkout a^0 &&
 	! git cherry-pick c &&
-	git diff --exit-code a
+	git diff --exit-code a --
 
 '
 
@@ -98,7 +98,7 @@ test_expect_success 'revert a merge (1)' '
 	git reset --hard &&
 	git checkout c^0 &&
 	git revert -m 1 c &&
-	git diff --exit-code a
+	git diff --exit-code a --
 
 '
 
@@ -107,7 +107,7 @@ test_expect_success 'revert a merge (2)' '
 	git reset --hard &&
 	git checkout c^0 &&
 	git revert -m 2 c &&
-	git diff --exit-code b
+	git diff --exit-code b --
 
 '
 
-- 
1.5.3.5.530.gcd7a
Next: Alex Riesen
Message 1 of 4 in “t3502: Disambiguate between file and rev by adding --”
  1. t3502: Disambiguate between file and rev by adding --Brian Gernhardt, Nov 4, 2007
  2. Alex RiesenNov 5, 2007
  3. Brian GernhardtNov 6, 2007
  4. Junio C HamanoNov 6, 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.