Junio C Hamano [off-list ref] writes:
Rubén Justo [off-list ref] writes:
quoted
diff --git a/builtin/log.c b/builtin/log.c
index c8ce0c0d88..8032909d4f 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -2277,6 +2277,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (cover_letter == -1) {
if (config_cover_letter == COVER_AUTO)
cover_letter = (total > 1);
+ else if ((idiff_prev.nr || rdiff_prev) && (total > 1))
+ cover_letter = (config_cover_letter != COVER_OFF);
else
cover_letter = (config_cover_letter == COVER_ON);
}
Interesting. So those who really really hate cover letters can set
the configuration explicitly to 'off' and giving an --interdiff
option would still have the sanity check kick in. Makes sense.
This is not covered by the added tests, is it?
We need to test this case: the user asks for --interdiff but at the
same time refuses with --no-cover-letter (or its config equivalent)
to create a cover letter.
As I said already, everything else looked OK in this patch.
Thanks.