Merge branch 'rj/format-patch-auto-cover-with-interdiff'

"git format-patch --interdiff" for multi-patch series learned to
turn on cover letters automatically (unless told never to enable
cover letter with "--no-cover-letter" and such).

* rj/format-patch-auto-cover-with-interdiff:
  format-patch: assume --cover-letter for diff in multi-patch series
  t4014: cleanups in a few tests
This commit is contained in:
Junio C Hamano
2024-06-20 15:45:12 -07:00
3 changed files with 36 additions and 5 deletions

View File

@ -2382,6 +2382,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (cover_letter == -1) {
if (cfg.config_cover_letter == COVER_AUTO)
cover_letter = (total > 1);
else if ((idiff_prev.nr || rdiff_prev) && (total > 1))
cover_letter = (cfg.config_cover_letter != COVER_OFF);
else
cover_letter = (cfg.config_cover_letter == COVER_ON);
}