From 5d02294c776c46f0d454470c66c16fe9f08fad3d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 2 Mar 2008 15:53:04 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- builtin-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-log.c') diff --git a/builtin-log.c b/builtin-log.c index bbadbc0de2..fd9b3ae95e 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -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); -- cgit v1.2.3