Thread (1 message) 1 message, 1 author, 2021-05-11

Re: [PATCH 2/6] diff-merges: move specific diff-index "-m" handling to diff-index

From: Junio C Hamano <hidden>
Date: 2021-05-11 05:41:05
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

I'll insert the following immediately after this step as a reminder
for ourselves while queuing.

---- >8 -------- >8 -------- >8 -------- >8 -------- >8 ----
Subject: [PATCH] t4062: diff-index -S can take its string as a separate arg

Butchering the command line parser in a wrong way can break this
test, confusing the parser to mistake "--cached" which is a mere
argument to the "-S" option as "compare the tree with the index"
option.

Signed-off-by: Junio C Hamano <redacted>
---
 t/t4062-diff-pickaxe.sh | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/t/t4062-diff-pickaxe.sh b/t/t4062-diff-pickaxe.sh
index 1130c8019b..1c93812378 100755
--- a/t/t4062-diff-pickaxe.sh
+++ b/t/t4062-diff-pickaxe.sh
@@ -26,4 +26,9 @@ test_expect_success '-S --pickaxe-regex' '
 	verbose test 4096-zeroes.txt = "$(cat out)"
 '
 
+test_expect_failure '-S with separate option should not error out' '
+	# "--cached" here is not an option---it is an arg to "-S"
+	git diff-index -S --cached HEAD^
+'
+
 test_done
-- 
2.31.1-734-g054d640baf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help