<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/log.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-03-27T20:10:12Z</updated>
<entry>
<title>format-patch: removing unconditional wrapping</title>
<updated>2026-03-27T20:10:12Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-27T19:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0284046ad01e22b5e794a864a96925791f75353c'/>
<id>urn:sha1:0284046ad01e22b5e794a864a96925791f75353c</id>
<content type='text'>
Using format-patch with --commit-list-format different than shortlog,
causes the commit entry lines to wrap if they get longer than
MAIL_DEFAULT_WRAP (72 characters).

While this might be sensible for many when sending changes through
email, it forces this decision of wrapping on the user, reducing the
control granularity of --commit-list-format.

Teach generate_commit_list_cover() to respect commit entry line lengths
and place this wrapping rule on the "modern" preset format instead.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: --commit-list-format without prefix</title>
<updated>2026-03-23T20:06:59Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36c16a5b7fff7806b475b5fa07eca3a5179d7fa6'/>
<id>urn:sha1:36c16a5b7fff7806b475b5fa07eca3a5179d7fa6</id>
<content type='text'>
Having to prefix a custom format-string with "log:" when passed from the
CLI can be annoying. It would be great if this prefix wasn't required.

Teach make_cover_letter() to accept custom format-strings without the
"log:" prefix if a placeholder is detected.

Note that both here and in "git log --format" the check is done naively
by just checking for the presence of a '%'.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: add preset for --commit-list-format</title>
<updated>2026-03-23T20:06:59Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d022dc77ab81fcc005b9965e91f524d4a43e74b5'/>
<id>urn:sha1:d022dc77ab81fcc005b9965e91f524d4a43e74b5</id>
<content type='text'>
"git format-patch --commit-list-format" enables the user to make their
own format for the commit list in the cover letter. It would be nice to
have a ready to use format to replace shortlog.

Teach make_cover_letter() the "modern" format preset.
This new format is the same as: "log:[%(count)/%(total)] %s".

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: wrap generate_commit_list_cover()</title>
<updated>2026-03-23T20:06:59Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=617db87921e835f02ac132e86d0f7edc0d72915e'/>
<id>urn:sha1:617db87921e835f02ac132e86d0f7edc0d72915e</id>
<content type='text'>
While most conventions should not allow for the text lines in commit
messages to get too long, when they do it could make emails harder to
read.

Teach generate_commit_list_cover() to wrap its commit lines if they are
too long.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format.commitListFormat: strip meaning from empty</title>
<updated>2026-03-23T20:06:59Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24d174f9917cce804c9057061f7da0dbd3b88a24'/>
<id>urn:sha1:24d174f9917cce804c9057061f7da0dbd3b88a24</id>
<content type='text'>
The configuration variable format.commitListFormat allows for an empty
value. This is unusual and can create issues when interacting with this
configuration variable through the CLI.

Strip meaning to format.commitListFormat with an empty value.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: rename --cover-letter-format option</title>
<updated>2026-03-23T20:06:58Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67ea2ad7d1b006194762cbfcc0b7801ffe652ca4'/>
<id>urn:sha1:67ea2ad7d1b006194762cbfcc0b7801ffe652ca4</id>
<content type='text'>
To align the name of the configuration variable and the name of the
command line option, either one should change name. By changing the name
of the option we get the added benefit of having --cover-&lt;TAB&gt; expand to
--cover-letter without ambiguity.

If the user gives the --cover-letter-format option it would be
reasonable to expect that the user wants to generate the cover letter
despite not giving --cover-letter.

Rename --cover-letter-format to --commit-list-format and make it imply
--cover-letter unless --no-cover-letter is given.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: refactor generate_commit_list_cover</title>
<updated>2026-03-23T20:06:58Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-23T16:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3482b4278793f3adb1fa811dd30c637563ca9cec'/>
<id>urn:sha1:3482b4278793f3adb1fa811dd30c637563ca9cec</id>
<content type='text'>
Refactor for readability and remove unnecessary initialization.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mf/format-patch-cover-letter-format' into mf/format-patch-commit-list-format</title>
<updated>2026-03-16T19:42:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-16T19:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3c222ed9103db7947b432a99d460e22bdc873ca'/>
<id>urn:sha1:b3c222ed9103db7947b432a99d460e22bdc873ca</id>
<content type='text'>
* mf/format-patch-cover-letter-format:
  docs: add usage for the cover-letter fmt feature
  format-patch: add commitListFormat config
  format-patch: add ability to use alt cover format
  format-patch: move cover letter summary generation
  pretty.c: add %(count) and %(total) placeholders
</content>
</entry>
<entry>
<title>Merge branch 'kh/format-patch-noprefix-is-boolean'</title>
<updated>2026-03-10T21:23:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-10T21:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a8aebae972de22ecd5adb92fec9d77147949c8a'/>
<id>urn:sha1:9a8aebae972de22ecd5adb92fec9d77147949c8a</id>
<content type='text'>
The configuration variable format.noprefix did not behave as a
proper boolean variable, which has now been fixed and documented.

* kh/format-patch-noprefix-is-boolean:
  doc: diff-options.adoc: make *.noprefix split translatable
  doc: diff-options.adoc: show format.noprefix for format-patch
  format-patch: make format.noprefix a boolean
</content>
</entry>
<entry>
<title>format-patch: add commitListFormat config</title>
<updated>2026-03-07T01:16:44Z</updated>
<author>
<name>Mirko Faina</name>
<email>mroik@delayed.space</email>
</author>
<published>2026-03-06T23:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be0ef6fcd2379ea3dc1569d6d8c360d6d59d031f'/>
<id>urn:sha1:be0ef6fcd2379ea3dc1569d6d8c360d6d59d031f</id>
<content type='text'>
Using "--cover-letter" we can tell format-patch to generate a cover
letter, in this cover letter there's a list of commits included in the
patch series and the format is specified by the "--cover-letter-format"
option. Would be useful if this format could be configured from the
config file instead of always needing to pass it from the command line.

Teach format-patch how to read the format spec for the cover letter from
the config files. The variable it should look for is called
format.commitListFormat.

Possible values:
  - commitListFormat is set but no string is passed: it will default to
    "[%(count)/%(total)] %s"

  - if a string is passed: will use it as a format spec. Note that this
    is either "shortlog" or a format spec prefixed by "log:"
    e.g."log:%s (%an)"

  - if commitListFormat is not set: it will default to the shortlog
    format.

Signed-off-by: Mirko Faina &lt;mroik@delayed.space&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
