From: Junio C Hamano <gitster@pobox.com>
To: Mirko Faina <mroik@delayed.space>
Cc: Phillip Wood <phillip.wood123@gmail.com>,
git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Subject: Re: [PATCH v3 0/8] improve "git format-patch --commit-list-format"
Date: Fri, 27 Mar 2026 09:04:44 -0700 [thread overview]
Message-ID: <xmqqldfdmf6r.fsf@gitster.g> (raw)
In-Reply-To: <acXYSm1JoX6YRuoL@exploit> (Mirko Faina's message of "Fri, 27 Mar 2026 02:13:05 +0100")
Mirko Faina <mroik@delayed.space> writes:
> On Thu, Mar 26, 2026 at 09:37:17AM -0700, Junio C Hamano wrote:
>> Yup, I tried "modern" and generally liked it very much.
>>
>> The appearance of the list looked a bit odd that each element in a
>> list of things with heading was shown without any indentation before
>> the heading, though. I'd probably use
>>
>> --commit-list-format=" %(count): %<(72,trunc)%s"
>>
>> or something like that myself.
>>
>> I seem to be getting spurious blank lines between the lines with the
>> above, when I lengthen and shorten 72 in the format string above,
>> though. I haven't figured out what is broken, though.
>
> Could this be because of strbuf_add_wrapped_text()?
Ahh, I think that would explain it. In general, I think it is a
mistake to use strbuf_addwrapped_text() for any end-user
configurable output. After all, wouldn't %w(w,i1,i2) work in the
format string?
> In a previous review
> someone pointed out that there was no wrapping,
When the payload _can_ be specified to wrap (i.e., end-user
configurable output format), the wrapping should not be forced by
the mechanism. A project that is not ours may want to keep a single
long line for their commit list entries.
I do not mind if the default "modern" were defined to include %w()
to force wrapping to those who follow the default, of course. But
do not unconditionally wrap what the end-user formatted to their
liking.
next prev parent reply other threads:[~2026-03-27 16:04 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 23:20 [PATCH 0/7] improve "git format-patch --commit-list-format" Mirko Faina
2026-03-14 23:20 ` [PATCH 1/7] pretty.c: better die message %(count) and %(total) Mirko Faina
2026-03-14 23:20 ` [PATCH 2/7] format-patch: refactor generate_commit_list_cover Mirko Faina
2026-03-14 23:20 ` [PATCH 3/7] format-patch: rename --cover-letter-format option Mirko Faina
2026-03-14 23:20 ` [PATCH 4/7] format.commitListFormat: strip meaning from empty Mirko Faina
2026-03-14 23:20 ` [PATCH 5/7] format-patch: wrap generate_commit_list_cover() Mirko Faina
2026-03-17 15:32 ` Kristoffer Haugsbakk
2026-03-17 16:18 ` Mirko Faina
2026-03-14 23:20 ` [PATCH 6/7] format-patch: add preset for --commit-list-format Mirko Faina
2026-03-14 23:20 ` [PATCH 7/7] format-patch: --commit-list-format without prefix Mirko Faina
2026-03-17 15:29 ` Kristoffer Haugsbakk
2026-03-17 16:20 ` Mirko Faina
2026-03-19 22:38 ` [PATCH v2 0/8] improve "git format-patch --commit-list-format" Mirko Faina
2026-03-19 22:38 ` [PATCH v2 1/8] pretty.c: better die message %(count) and %(total) Mirko Faina
2026-03-19 22:38 ` [PATCH v2 2/8] format-patch: refactor generate_commit_list_cover Mirko Faina
2026-03-19 22:38 ` [PATCH v2 3/8] format-patch: rename --cover-letter-format option Mirko Faina
2026-03-19 22:38 ` [PATCH v2 4/8] docs/pretty-formats: add %(count) and %(total) Mirko Faina
2026-03-23 10:29 ` Kristoffer Haugsbakk
2026-03-23 14:00 ` Mirko Faina
2026-03-19 22:38 ` [PATCH v2 5/8] format.commitListFormat: strip meaning from empty Mirko Faina
2026-03-19 22:38 ` [PATCH v2 6/8] format-patch: wrap generate_commit_list_cover() Mirko Faina
2026-03-19 22:38 ` [PATCH v2 7/8] format-patch: add preset for --commit-list-format Mirko Faina
2026-03-19 22:38 ` [PATCH v2 8/8] format-patch: --commit-list-format without prefix Mirko Faina
2026-03-23 16:57 ` [PATCH v3 0/8] improve "git format-patch --commit-list-format" Mirko Faina
2026-03-23 16:57 ` [PATCH v3 1/8] pretty.c: better die message %(count) and %(total) Mirko Faina
2026-03-23 16:57 ` [PATCH v3 2/8] format-patch: refactor generate_commit_list_cover Mirko Faina
2026-03-23 16:57 ` [PATCH v3 3/8] format-patch: rename --cover-letter-format option Mirko Faina
2026-03-23 16:57 ` [PATCH v3 4/8] docs/pretty-formats: add %(count) and %(total) Mirko Faina
2026-03-23 16:57 ` [PATCH v3 5/8] format.commitListFormat: strip meaning from empty Mirko Faina
2026-03-23 16:57 ` [PATCH v3 6/8] format-patch: wrap generate_commit_list_cover() Mirko Faina
2026-03-23 16:57 ` [PATCH v3 7/8] format-patch: add preset for --commit-list-format Mirko Faina
2026-03-23 16:57 ` [PATCH v3 8/8] format-patch: --commit-list-format without prefix Mirko Faina
2026-03-23 20:10 ` [PATCH v3 0/8] improve "git format-patch --commit-list-format" Junio C Hamano
2026-03-24 16:19 ` Kristoffer Haugsbakk
2026-03-26 14:29 ` Phillip Wood
2026-03-26 16:37 ` Junio C Hamano
2026-03-27 1:13 ` Mirko Faina
2026-03-27 16:04 ` Junio C Hamano [this message]
2026-03-27 16:18 ` Mirko Faina
2026-03-27 16:47 ` Junio C Hamano
2026-03-26 16:34 ` D. Ben Knoble
2026-03-26 17:15 ` Mirko Faina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqldfdmf6r.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=mroik@delayed.space \
--cc=phillip.wood123@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.