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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <gitster@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux