summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dfbb30)
raw | patch | inline | side by side (parent: 6dfbb30)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 2 Mar 2008 15:53:04 +0000 (15:53 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 2 Mar 2008 23:27:08 +0000 (15:27 -0800) |
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>
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>
builtin-log.c | patch | blob | history | |
t/t4014-format-patch.sh | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index bbadbc0de2fe1a2c85f3488420172a4db2ab6b4a..fd9b3ae95ea8da03780f93382dd817a11cdbb9f3 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
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);
index 16aa99dc0dbe1fe7e09aa046dfc2dc1ec652963c..6d86b7dd7293cbff093944a01931a5e61ccfe926 100755 (executable)
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
for i in patches/0002-* patches/0003-*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/0001-* patches/0002-* patches/0003-*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
'
+test_expect_success 'cover-letter inherits diff options' '
+
+ git mv file foo &&
+ git commit -m foo &&
+ git format-patch --cover-letter -1 &&
+ ! grep "file => foo .* 0 *$" 0000-cover-letter.patch &&
+ git format-patch --cover-letter -1 -M &&
+ grep "file => foo .* 0 *$" 0000-cover-letter.patch
+
+'
test_done