Thread (18 messages) flat view 18 messages, 3 authors, 2016-06-15

Re: [PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:58:10

Possibly related (same subject, not in this thread)

Matthieu Moy wrote:
All options that trigger a patch output now override --no-patch.

The case of --binary is particular as the name may suggest that it turns
Usage nit: this should say "is unusual" or "In the case of --binary in
particular, the name may suggest ...".
a normal patch into a binary patch, but it actually already enables patch
output when normally disabled (e.g. "git log --binary" displays a patch),
hence it makes sense that "git show --no-patch --binary" display the
binary patch.
[...]
quoted hunk ↗ jump to hunk
--- a/t/t4000-diff-format.sh
+++ b/t/t4000-diff-format.sh
@@ -71,4 +71,9 @@ test_expect_success 'git diff-files --no-patch as synonym for -s' '
 	test_must_be_empty err
 '
 
+test_expect_success 'git diff-files --no-patch --patch shows the patch' '
+	git diff-files --no-patch --patch >diff-np-output 2>err &&
+	compare_diff_patch expected actual
Shouldn't that be "compare_diff_patch expected diff-np-output"?

A couple of other test ideas:

 - "git diff-files --patch --no-patch"
 - "git diff-files -s --patch-with-stat"

Aside from that, the patch looks good.

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help