diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-28 00:41:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-28 00:41:50 -0700 |
commit | 9d5156496d2d32800df52fa372295c16ab2578f0 (patch) | |
tree | fad95db756d46083c1c948c1b44cddf9896f98c5 /diff-no-index.c | |
parent | a8fac795ddaa004835fc688560cf19ca5500ce8d (diff) | |
parent | 81db4abf84ec7fbebeb08f6ad506138da2e7e4cd (diff) | |
download | git-9d5156496d2d32800df52fa372295c16ab2578f0.tar.gz git-9d5156496d2d32800df52fa372295c16ab2578f0.tar.xz |
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
test-lib: Clean up comments and Makefile.
diff --no-index: Do not generate patch output if other output is requested
Diffstat (limited to 'diff-no-index.c')
-rw-r--r-- | diff-no-index.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index 0a14268ba..7273a7a0b 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -201,8 +201,6 @@ void diff_no_index(struct rev_info *revs, 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")) @@ -248,6 +246,8 @@ void diff_no_index(struct rev_info *revs, 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); |