format-patch: use the diff options for the cover letter, too

Earlier, when you called "git format-patch --cover-letter -M", the
diffstat in the cover letter would not inherit the "-M".  Now it does.

While at it, add a few "|| break" statements in the test's loops;
otherwise, breakages inside the loops would not be caught.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2008-03-02 15:53:04 +00:00
committed by Junio C Hamano
parent 6dfbb304be
commit 5d02294c77
2 changed files with 16 additions and 6 deletions

View File

@ -694,8 +694,8 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
if (!origin)
return;
diff_setup(&opts);
opts.output_format |= DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
memcpy(&opts, &rev->diffopt, sizeof(opts));
opts.output_format = DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
diff_setup_done(&opts);