summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a5643d)
raw | patch | inline | side by side (parent: 2a5643d)
author | Johannes Sixt <j6t@kdbg.org> | |
Wed, 25 Mar 2009 17:19:46 +0000 (18:19 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Mar 2009 19:15:30 +0000 (12:15 -0700) |
Previously, 'git diff --no-index --stat a b' generated patch output in
addition to the --stat output (or whatever other output format was
requested). Now only the requested output is generated, and patch
output remains the default.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
addition to the --stat output (or whatever other output format was
requested). Now only the requested output is generated, and patch
output remains the default.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c | patch | blob | history |
diff --git a/diff-no-index.c b/diff-no-index.c
index 2d541d9aba11ee69525a6a1ef5da6f8a61e9e65e..a3e47a76e401a1b98891b15a406b5806a294af3d 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
no_index ? "--no-index" : "[--no-index]");
diff_setup(&revs->diffopt);
- if (!revs->diffopt.output_format)
- revs->diffopt.output_format = DIFF_FORMAT_PATCH;
for (i = 1; i < argc - 2; ) {
int j;
if (!strcmp(argv[i], "--no-index"))
revs->diffopt.paths = argv + argc - 2;
revs->diffopt.nr_paths = 2;
revs->diffopt.skip_stat_unmatch = 1;
+ if (!revs->diffopt.output_format)
+ revs->diffopt.output_format = DIFF_FORMAT_PATCH;
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
DIFF_OPT_SET(&revs->diffopt, NO_INDEX);