Skip to contentSkip to conversation

t7060: actually test "git diff-index --cached -M"

PATCH In review Matthieu Prat 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t7060: actually test "git diff-index --cached -M"

A test was designed for "git diff-index --cached -M" but the command is run without the "-M" option (which makes the test essentially identical to its preceding counterpart).

Give the command the option it deserves and the test a raison d'être.

---
 t/t7060-wtstatus.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t7060-wtstatus.sh +1 -1
index 741ec08..32d8176 100755
@@ -106,7 +106,7 @@ test_expect_success 'git diff-index --cached -M shows 2 added + 1 unmerged' '
 	A	THREE
 	A	TWO
 	EOF
-	git diff-index --cached --name-status HEAD >actual &&
+	git diff-index --cached -M --name-status HEAD >actual &&
 	test_cmp expected actual
 '
 
Signature · 1 line
2.5.0
#1 lore raw
Quoted 3 lines · Matthieu Prat

A test was designed for "git diff-index --cached -M" but the command is run without the "-M" option (which makes the test essentially identical to its preceding counterpart).

Very true and it seems that it has been that way from the day these trio of tests were introduced by d7c9bf22 (diffcore-rename: don't consider unmerged path as source, 2011-03-23).

Thanks for a fix. Will queue.