{"thread":{"id":"65362","subject":"[PATCH] docs: fix --commit-list-format related entries","startedAt":"2026-03-26T18:56:08Z","lastAt":"2026-03-27T20:27:20Z","messageCount":12,"participants":["Mirko Faina","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"540116","messageId":"20260326185541.17523-1-mroik@delayed.space","threadId":"65362","inReplyTo":null,"subject":"[PATCH] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-26T18:55:41Z","receivedAt":"2026-03-26T18:56:08Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"Documentation specifies that \"git format-patch\" would default to\nformat.commitListFormat if --commit-list-format is not given, but\ndoesn't specify the default if the format.commitListFormat is not set.\nThe text for --cover-letter is also obsolete as the commit list can now\nbe something other than a shortlog.\n\nDocument to reflect changes.\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\nThis series is based on top of 41688c1a23 (The 21st batch, 2026-03-25)\nwith the following series merged into it:\n  - mf/format-patch-commit-list-format at 36c16a5b7f (format-patch:\n    --commit-list-format without prefix, 2026-03-23)\n\n Documentation/config/format.adoc    |  2 +-\n Documentation/git-format-patch.adoc | 20 ++++++++++----------\n 2 files changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc\nindex ef1ed1d250..dbd186290b 100644\n--- a/Documentation/config/format.adoc\n+++ b/Documentation/config/format.adoc\n@@ -103,7 +103,7 @@ format.coverLetter::\n \n format.commitListFormat::\n \tWhen the `--cover-letter-format` option is not given, `format-patch`\n-\tuses the value of this variable to decide how to format the title of\n+\tuses the value of this variable to decide how to format the entry of\n \teach commit. Defaults to `shortlog`.\n \n format.outputDirectory::\ndiff --git a/Documentation/git-format-patch.adoc b/Documentation/git-format-patch.adoc\nindex c52dbcc170..e74b085c77 100644\n--- a/Documentation/git-format-patch.adoc\n+++ b/Documentation/git-format-patch.adoc\n@@ -319,21 +319,21 @@ feeding the result to `git send-email`.\n \n --cover-letter::\n --no-cover-letter::\n-\tIn addition to the patches, generate a cover letter file\n-\tcontaining the branch description, shortlog and the overall diffstat.  You can\n-\tfill in a description in the file before sending it out.\n+\tIn addition to the patches, generate a cover letter file containing the\n+\tbranch description, commit list and the overall diffstat.  You can fill\n+\tin a description in the file before sending it out.\n \n --commit-list-format=<format-spec>::\n \tSpecify the format in which to generate the commit list of the patch\n-\tseries. The accepted values for format-spec are `shortlog`, `modern` or a\n-\tformat-string prefixed with `log:`.\n-\te.g. `log: %s (%an)`\n+\tseries. The accepted values for format-spec are `shortlog`, `modern` or\n+\ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n+\tModern is the same as `log:[%(count)/%(total)] %s`.\n \tThe user is allowed to drop the prefix if the format-string contains a\n \t`%<placeholder>`.\n-\tIf not given, defaults to the `format.commitListFormat` configuration\n-\tvariable.\n-\tThis option implies the use of `--cover-letter` unless\n-\t`--no-cover-letter` is given.\n+\tIf not given, defaults to `shortlog` unless the\n+\t`format.commitListFormat` configuration variable is set. This option\n+\timplies the use of `--cover-letter` unless `--no-cover-letter` is\n+\tgiven.\n \n --encode-email-headers::\n --no-encode-email-headers::\n-- \n2.53.0.1181.g1066ffbbbe\n\n"},{"id":"540120","messageId":"xmqqpl4qpfu7.fsf@gitster.g","threadId":"65362","inReplyTo":"20260326185541.17523-1-mroik@delayed.space","subject":"Re: [PATCH] docs: fix --commit-list-format related entries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-26T19:10:08Z","receivedAt":"2026-03-26T19:10:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n>  \tThe user is allowed to drop the prefix if the format-string contains a\n>  \t`%<placeholder>`.\n\nAs you do not, and we do not want to, parse and validate\nplaceholder, it is more honest to phrase this like\n\n\tA format-string that contains a `%` letter is treated as a\n\tcustom format even if it lacks the `log:` prefix.\n\neven if we omit saying \", expecting that '%' is part of a %<prefix>\",\nor \", similar to how `git log --pretty=<format>` works as if the\n<format> were prefixed with `format:`\".\n\n> -\tIf not given, defaults to the `format.commitListFormat` configuration\n> -\tvariable.\n> -\tThis option implies the use of `--cover-letter` unless\n> -\t`--no-cover-letter` is given.\n> +\tIf not given, defaults to `shortlog` unless the\n> +\t`format.commitListFormat` configuration variable is set. This option\n> +\timplies the use of `--cover-letter` unless `--no-cover-letter` is\n> +\tgiven.\n\nA new reader would wonder if setting the configuration variable\nwould count as a trigger to \"This option implies\", even though we\nonly want an explicit command line option to do so.\n\nHere is myu attempt to rephrase it, but\n\n    Use of this option from the command line implies `--cover-letter`;\n    an explicit `--no-cover-letter` can defeat it.\n\nI am not sure how much better it is from the original.\n\n\n"},{"id":"540134","messageId":"20260326200643.20251-1-mroik@delayed.space","threadId":"65362","inReplyTo":"20260326185541.17523-1-mroik@delayed.space","subject":"[PATCH v2] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-26T20:06:40Z","receivedAt":"2026-03-26T20:06:59Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"Documentation specifies that \"git format-patch\" would default to\nformat.commitListFormat if --commit-list-format is not given, but\ndoesn't specify the default if the format.commitListFormat is not set.\nThe text for --cover-letter is also obsolete as the commit list can now\nbe something other than a shortlog.\n\nDocument to reflect changes.\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\nEnded up with something more verbose compared to what Junio proposed,\nbut it might help the user to better understand why we check for the '%'\nin the first place.\n\nSame goes for the implied `--cover-letter`. Instead of rephrasing I\nadded a note for the user to clear up any ambiguity.\n\n Documentation/config/format.adoc    |  2 +-\n Documentation/git-format-patch.adoc | 27 +++++++++++++++------------\n 2 files changed, 16 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc\nindex ef1ed1d250..dbd186290b 100644\n--- a/Documentation/config/format.adoc\n+++ b/Documentation/config/format.adoc\n@@ -103,7 +103,7 @@ format.coverLetter::\n \n format.commitListFormat::\n \tWhen the `--cover-letter-format` option is not given, `format-patch`\n-\tuses the value of this variable to decide how to format the title of\n+\tuses the value of this variable to decide how to format the entry of\n \teach commit. Defaults to `shortlog`.\n \n format.outputDirectory::\ndiff --git a/Documentation/git-format-patch.adoc b/Documentation/git-format-patch.adoc\nindex c52dbcc170..fc0023b9b7 100644\n--- a/Documentation/git-format-patch.adoc\n+++ b/Documentation/git-format-patch.adoc\n@@ -319,21 +319,24 @@ feeding the result to `git send-email`.\n \n --cover-letter::\n --no-cover-letter::\n-\tIn addition to the patches, generate a cover letter file\n-\tcontaining the branch description, shortlog and the overall diffstat.  You can\n-\tfill in a description in the file before sending it out.\n+\tIn addition to the patches, generate a cover letter file containing the\n+\tbranch description, commit list and the overall diffstat.  You can fill\n+\tin a description in the file before sending it out.\n \n --commit-list-format=<format-spec>::\n \tSpecify the format in which to generate the commit list of the patch\n-\tseries. The accepted values for format-spec are `shortlog`, `modern` or a\n-\tformat-string prefixed with `log:`.\n-\te.g. `log: %s (%an)`\n-\tThe user is allowed to drop the prefix if the format-string contains a\n-\t`%<placeholder>`.\n-\tIf not given, defaults to the `format.commitListFormat` configuration\n-\tvariable.\n-\tThis option implies the use of `--cover-letter` unless\n-\t`--no-cover-letter` is given.\n+\tseries. The accepted values for format-spec are `shortlog`, `modern` or\n+\ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n+\tModern is the same as `log:[%(count)/%(total)] %s`.\n+\tThe user is allowed to drop the `log:` prefix if the format-string\n+\tcontains a '%' character. The '%' is expected as part of a placeholder\n+\tbut this is not validated by git.\n+\tIf not given, defaults to `shortlog` unless the\n+\t`format.commitListFormat` configuration variable is set.\n+\tThis option given from the command-line implies the use of\n+\t`--cover-letter` unless `--no-cover-letter` is given. Note that\n+\t`format.commitListFormat` being set does not imply the use of\n+\t`--cover-letter`.\n \n --encode-email-headers::\n --no-encode-email-headers::\n-- \n2.53.0.1181.g1066ffbbbe\n\n"},{"id":"540137","messageId":"xmqqse9mnwv8.fsf@gitster.g","threadId":"65362","inReplyTo":"20260326200643.20251-1-mroik@delayed.space","subject":"Re: [PATCH v2] docs: fix --commit-list-format related entries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-26T20:45:15Z","receivedAt":"2026-03-26T20:45:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n> Ended up with something more verbose compared to what Junio proposed,\n> but it might help the user to better understand why we check for the '%'\n> in the first place.\n>\n> Same goes for the implied `--cover-letter`. Instead of rephrasing I\n> added a note for the user to clear up any ambiguity.\n\nI dunno.  \n\nBeing verbose is usually a good way to discourage readers from\nreading.\n\nLet's see if we can shorten them without losing information.\n\n>  --commit-list-format=<format-spec>::\n>  \tSpecify the format in which to generate the commit list of the patch\n> +\tseries. The accepted values for format-spec are `shortlog`, `modern` or\n> +\ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n> +\tModern is the same as `log:[%(count)/%(total)] %s`.\n\n\"Modern\" -> \"`modern`\".\n\nThis is necessary to stress the fact that this is a fixed token the\nuser must give verbatim.\n\n> +\tThe user is allowed to drop the `log:` prefix if the format-string\n> +\tcontains a '%' character. The '%' is expected as part of a placeholder\n> +\tbut this is not validated by git.\n\n    The `log:` prefix can be omitted if the format-string has a `%`\n    in it (expecting that it is part of `%<placeholder>`).\n\n> +\tIf not given, defaults to `shortlog` unless the\n> +\t`format.commitListFormat` configuration variable is set.\n\n    Defaults to the `format.commitListFormat` configuration\n    variable, if set, or `shortlog`.\n\n> +\tThis option given from the command-line implies the use of\n> +\t`--cover-letter` unless `--no-cover-letter` is given. Note that\n> +\t`format.commitListFormat` being set does not imply the use of\n> +\t`--cover-letter`.\n\n    The use of this command line option implies `--cover-letter`,\n    unless explicitly countermanded with `--no-cover-letter`.\n\n"},{"id":"540141","messageId":"acWbpJTRusOv6bPk@exploit","threadId":"65362","inReplyTo":"xmqqse9mnwv8.fsf@gitster.g","subject":"Re: [PATCH v2] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-26T20:53:56Z","receivedAt":"2026-03-26T20:53:59Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"On Thu, Mar 26, 2026 at 01:45:15PM -0700, Junio C Hamano wrote:\n> Being verbose is usually a good way to discourage readers from\n> reading.\n\nYou're right, and most of the proposed changes do shorten the text very\nwell (will apply), but...\n\n> Let's see if we can shorten them without losing information.\n> \n> >  --commit-list-format=<format-spec>::\n> >  \tSpecify the format in which to generate the commit list of the patch\n> > +\tseries. The accepted values for format-spec are `shortlog`, `modern` or\n> > +\ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n> > +\tModern is the same as `log:[%(count)/%(total)] %s`.\n> \n> \"Modern\" -> \"`modern`\".\n> \n> This is necessary to stress the fact that this is a fixed token the\n> user must give verbatim.\n> \n> > +\tThe user is allowed to drop the `log:` prefix if the format-string\n> > +\tcontains a '%' character. The '%' is expected as part of a placeholder\n> > +\tbut this is not validated by git.\n> \n>     The `log:` prefix can be omitted if the format-string has a `%`\n>     in it (expecting that it is part of `%<placeholder>`).\n> \n> > +\tIf not given, defaults to `shortlog` unless the\n> > +\t`format.commitListFormat` configuration variable is set.\n> \n>     Defaults to the `format.commitListFormat` configuration\n>     variable, if set, or `shortlog`.\n> \n> > +\tThis option given from the command-line implies the use of\n> > +\t`--cover-letter` unless `--no-cover-letter` is given. Note that\n> > +\t`format.commitListFormat` being set does not imply the use of\n> > +\t`--cover-letter`.\n> \n>     The use of this command line option implies `--cover-letter`,\n>     unless explicitly countermanded with `--no-cover-letter`.\n\nthis part in particular is no different than the original text:\n\n    This option implies the use of `--cover-letter` unless\n    `--no-cover-letter` is given.\n\nIf we want to emphasize that the configuration variable doesn't imply\n--cover-letter, we have to add the note on `format.commitListFormat`.\n\nThank you\n"},{"id":"540143","messageId":"xmqqo6kanvpn.fsf@gitster.g","threadId":"65362","inReplyTo":"acWbpJTRusOv6bPk@exploit","subject":"Re: [PATCH v2] docs: fix --commit-list-format related entries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-26T21:10:12Z","receivedAt":"2026-03-26T21:10:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n> On Thu, Mar 26, 2026 at 01:45:15PM -0700, Junio C Hamano wrote:\n>> Being verbose is usually a good way to discourage readers from\n>> reading.\n> ...\n>>     The use of this command line option implies `--cover-letter`,\n>>     unless explicitly countermanded with `--no-cover-letter`.\n>\n> this part in particular is no different than the original text:\n>\n>     This option implies the use of `--cover-letter` unless\n>     `--no-cover-letter` is given.\n>\n> If we want to emphasize that the configuration variable doesn't imply\n> --cover-letter, we have to add the note on `format.commitListFormat`.\n\nI do not think so.  \n\nIf we mention a variable, the readers would wonder if the variable\nhas effects.  You can explicitly say that that it does *not* have\neffect, but we are often better of not mentioning what is not\nrelevant.\n"},{"id":"540158","messageId":"acXM3e23Us-mJxeE@exploit","threadId":"65362","inReplyTo":"xmqqo6kanvpn.fsf@gitster.g","subject":"Re: [PATCH v2] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-27T00:20:59Z","receivedAt":"2026-03-27T00:21:06Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"On Thu, Mar 26, 2026 at 02:10:12PM -0700, Junio C Hamano wrote:\n> Mirko Faina <mroik@delayed.space> writes:\n> \n> > On Thu, Mar 26, 2026 at 01:45:15PM -0700, Junio C Hamano wrote:\n> >> Being verbose is usually a good way to discourage readers from\n> >> reading.\n> > ...\n> >>     The use of this command line option implies `--cover-letter`,\n> >>     unless explicitly countermanded with `--no-cover-letter`.\n> >\n> > this part in particular is no different than the original text:\n> >\n> >     This option implies the use of `--cover-letter` unless\n> >     `--no-cover-letter` is given.\n> >\n> > If we want to emphasize that the configuration variable doesn't imply\n> > --cover-letter, we have to add the note on `format.commitListFormat`.\n> \n> I do not think so.  \n> \n> If we mention a variable, the readers would wonder if the variable\n> has effects.  You can explicitly say that that it does *not* have\n> effect, but we are often better of not mentioning what is not\n> relevant.\n\nSo the issue with the original is simply the fact that it wasn't\nexplicitly said from the command line? If that's the case then the v2\nshould be fine but without the note about the configuration variable,\ni.e. \"This option given from the command-line implies the use of\n`--cover-letter` unless `--no-cover-letter` is given.\"\n\nThank you\n"},{"id":"540159","messageId":"acXOAMKsDpyN9Zkx@exploit","threadId":"65362","inReplyTo":"acXM3e23Us-mJxeE@exploit","subject":"Re: [PATCH v2] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-27T00:25:00Z","receivedAt":"2026-03-27T00:25:03Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"I will wait for tomorrow to send a reroll just in case someone wants to\ncomment on v2.\n"},{"id":"540224","messageId":"cover.1774640789.git.mroik@delayed.space","threadId":"65362","inReplyTo":"20260326200643.20251-1-mroik@delayed.space","subject":"[PATCH 0/2] format-patch: remove wrapping and update docs","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-27T19:48:08Z","receivedAt":"2026-03-27T19:48:57Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"This series adds the missing default value for --commit-list-format in\nthe documentation and removes unconditional wrapping from the commit\nlist entries.\n\nThis series is based on top of 41688c1a23 (The 21st batch, 2026-03-25)\nwith the following series merged into it:\n  - mf/format-patch-commit-list-format at 36c16a5b7f (format-patch:\n    --commit-list-format without prefix, 2026-03-23)\n\n[1/2] docs: fix --commit-list-format related entries (Mirko Faina)\n[2/2] format-patch: removing unconditional wrapping (Mirko Faina)\n\n Documentation/config/format.adoc    |  2 +-\n Documentation/git-format-patch.adoc | 24 ++++++++++++------------\n builtin/log.c                       |  9 ++-------\n 3 files changed, 15 insertions(+), 20 deletions(-)\n\n-- \n2.53.0.1181.g1066ffbbbe\n\n"},{"id":"540225","messageId":"ce285272c4a1ab09a03c9219066674f0bd9c59c2.1774640789.git.mroik@delayed.space","threadId":"65362","inReplyTo":"cover.1774640789.git.mroik@delayed.space","subject":"[PATCH 1/2] docs: fix --commit-list-format related entries","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-27T19:48:09Z","receivedAt":"2026-03-27T19:48:58Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"Documentation specifies that \"git format-patch\" would default to\nformat.commitListFormat if --commit-list-format is not given, but\ndoesn't specify the default if the format.commitListFormat is not set.\nThe text for --cover-letter is also obsolete as the commit list can now\nbe something other than a shortlog.\n\nDocument to reflect changes.\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\n Documentation/config/format.adoc    |  2 +-\n Documentation/git-format-patch.adoc | 24 ++++++++++++------------\n 2 files changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc\nindex ef1ed1d250..dbd186290b 100644\n--- a/Documentation/config/format.adoc\n+++ b/Documentation/config/format.adoc\n@@ -103,7 +103,7 @@ format.coverLetter::\n \n format.commitListFormat::\n \tWhen the `--cover-letter-format` option is not given, `format-patch`\n-\tuses the value of this variable to decide how to format the title of\n+\tuses the value of this variable to decide how to format the entry of\n \teach commit. Defaults to `shortlog`.\n \n format.outputDirectory::\ndiff --git a/Documentation/git-format-patch.adoc b/Documentation/git-format-patch.adoc\nindex c52dbcc170..cbbb292cb5 100644\n--- a/Documentation/git-format-patch.adoc\n+++ b/Documentation/git-format-patch.adoc\n@@ -319,21 +319,21 @@ feeding the result to `git send-email`.\n \n --cover-letter::\n --no-cover-letter::\n-\tIn addition to the patches, generate a cover letter file\n-\tcontaining the branch description, shortlog and the overall diffstat.  You can\n-\tfill in a description in the file before sending it out.\n+\tIn addition to the patches, generate a cover letter file containing the\n+\tbranch description, commit list and the overall diffstat.  You can fill\n+\tin a description in the file before sending it out.\n \n --commit-list-format=<format-spec>::\n \tSpecify the format in which to generate the commit list of the patch\n-\tseries. The accepted values for format-spec are `shortlog`, `modern` or a\n-\tformat-string prefixed with `log:`.\n-\te.g. `log: %s (%an)`\n-\tThe user is allowed to drop the prefix if the format-string contains a\n-\t`%<placeholder>`.\n-\tIf not given, defaults to the `format.commitListFormat` configuration\n-\tvariable.\n-\tThis option implies the use of `--cover-letter` unless\n-\t`--no-cover-letter` is given.\n+\tseries. The accepted values for format-spec are `shortlog`, `modern` or\n+\ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n+\t`modern` is the same as `log:[%(count)/%(total)] %s`.\n+\tThe `log:` prefix can be omitted if the format-string has a `%` in it\n+\t(expecting that it is part of `%<placeholder>`).\n+\tDefaults to the `format.commitListFormat` configuration variable, if\n+\tset, or `shortlog`.\n+\tThis option given from the command-line implies the use of\n+\t`--cover-letter` unless `--no-cover-letter` is given.\n \n --encode-email-headers::\n --no-encode-email-headers::\n-- \n2.53.0.1181.g1066ffbbbe\n\n"},{"id":"540226","messageId":"204b9320f46529d16d3a4d9a9c4a57253b4db028.1774640789.git.mroik@delayed.space","threadId":"65362","inReplyTo":"cover.1774640789.git.mroik@delayed.space","subject":"[PATCH 2/2] format-patch: removing unconditional wrapping","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-03-27T19:48:10Z","receivedAt":"2026-03-27T19:48:58Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":null},"body":"Using format-patch with --commit-list-format different than shortlog,\ncauses the commit entry lines to wrap if they get longer than\nMAIL_DEFAULT_WRAP (72 characters).\n\nWhile this might be sensible for many when sending changes through\nemail, it forces this decision of wrapping on the user, reducing the\ncontrol granularity of --commit-list-format.\n\nTeach generate_commit_list_cover() to respect commit entry line lengths\nand place this wrapping rule on the \"modern\" preset format instead.\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\n Documentation/git-format-patch.adoc | 2 +-\n builtin/log.c                       | 9 ++-------\n 2 files changed, 3 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-format-patch.adoc b/Documentation/git-format-patch.adoc\nindex cbbb292cb5..5662382450 100644\n--- a/Documentation/git-format-patch.adoc\n+++ b/Documentation/git-format-patch.adoc\n@@ -327,7 +327,7 @@ feeding the result to `git send-email`.\n \tSpecify the format in which to generate the commit list of the patch\n \tseries. The accepted values for format-spec are `shortlog`, `modern` or\n \ta format-string prefixed with `log:`. E.g. `log: %s (%an)`.\n-\t`modern` is the same as `log:[%(count)/%(total)] %s`.\n+\t`modern` is the same as `log:%w(72)[%(count)/%(total)] %s`.\n \tThe `log:` prefix can be omitted if the format-string has a `%` in it\n \t(expecting that it is part of `%<placeholder>`).\n \tDefaults to the `format.commitListFormat` configuration variable, if\ndiff --git a/builtin/log.c b/builtin/log.c\nindex ad7b7215fe..8c0939dd42 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -1365,7 +1365,6 @@ static void generate_commit_list_cover(FILE *cover_file, const char *format,\n \t\t\t\t       struct commit **list, int n)\n {\n \tstruct strbuf commit_line = STRBUF_INIT;\n-\tstruct strbuf wrapped_line = STRBUF_INIT;\n \tstruct pretty_print_context ctx = {0};\n \tstruct rev_info rev = REV_INFO_INIT;\n \n@@ -1375,16 +1374,12 @@ static void generate_commit_list_cover(FILE *cover_file, const char *format,\n \t\trev.nr = i;\n \t\trepo_format_commit_message(the_repository, list[n - i], format,\n \t\t\t\t&commit_line, &ctx);\n-\t\tstrbuf_add_wrapped_text(&wrapped_line, commit_line.buf, 0, 0,\n-\t\t\t\t\tMAIL_DEFAULT_WRAP);\n-\t\tfprintf(cover_file, \"%s\\n\", wrapped_line.buf);\n+\t\tfprintf(cover_file, \"%s\\n\", commit_line.buf);\n \t\tstrbuf_reset(&commit_line);\n-\t\tstrbuf_reset(&wrapped_line);\n \t}\n \tfprintf(cover_file, \"\\n\");\n \n \tstrbuf_release(&commit_line);\n-\tstrbuf_release(&wrapped_line);\n }\n \n static void make_cover_letter(struct rev_info *rev, int use_separate_file,\n@@ -1446,7 +1441,7 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,\n \telse if (!strcmp(format, \"shortlog\"))\n \t\tgenerate_shortlog_cover_letter(&log, rev, list, nr);\n \telse if (!strcmp(format, \"modern\"))\n-\t\tgenerate_commit_list_cover(rev->diffopt.file, \"[%(count)/%(total)] %s\",\n+\t\tgenerate_commit_list_cover(rev->diffopt.file, \"%w(72)[%(count)/%(total)] %s\",\n \t\t\t\t\t   list, nr);\n \telse if (strchr(format, '%'))\n \t\tgenerate_commit_list_cover(rev->diffopt.file, format, list, nr);\n-- \n2.53.0.1181.g1066ffbbbe\n\n"},{"id":"540234","messageId":"xmqq7bqxj9wa.fsf@gitster.g","threadId":"65362","inReplyTo":"204b9320f46529d16d3a4d9a9c4a57253b4db028.1774640789.git.mroik@delayed.space","subject":"Re: [PATCH 2/2] format-patch: removing unconditional wrapping","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-27T20:27:17Z","receivedAt":"2026-03-27T20:27:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n> Using format-patch with --commit-list-format different than shortlog,\n> causes the commit entry lines to wrap if they get longer than\n> MAIL_DEFAULT_WRAP (72 characters).\n>\n> While this might be sensible for many when sending changes through\n> email, it forces this decision of wrapping on the user, reducing the\n> control granularity of --commit-list-format.\n>\n> Teach generate_commit_list_cover() to respect commit entry line lengths\n> and place this wrapping rule on the \"modern\" preset format instead.\n\nWell explained.  I would have personally picked a sligntly different\ndefault format, but this topic is your itch, so it's OK.\n\nWill queue.  Looks very good.  Thanks.\n"}]}