Comment trailers vs. bracketed lines
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Oct 20, 2024, 17:08 UTC
- Message-ID
- <ae56dc14-bbae-4d5e-a890-20735131d484@app.fastmail.com>
- In-Reply-To
- <20241019212135.GB589728@coredump.intra.peff.net>
Hi Peff
(editing the subject now which I intended to do from the start)
On Sat, Oct 19, 2024, at 23:21, Jeff King wrote:
Show 9 quoted lines
>> On Fri, Oct 18, 2024, at 07:29, Jeff King wrote: >> […] > > I assigned authorship to Ramsay, so my name is not otherwise mentioned, > but appears in the signoff. So it was a way of mentioning what I > contributed (both for credit, but also in case anybody has questions > later). > > I guess "Commit-message-by:" would work, too. ;)
I’ve done that when someone has given me a non-descript diff. :)
Show 7 quoted lines
> I think in the usual trailer order, it would be: > > Signed-off-by: Ramsay > [jk: add commit message] > Signed-off-by: me > > but I didn't want to forge his S-o-b without asking first.
I’ve seen those brackets in the log. They used to happen with some regularity. At first it made sense since you need a free-form area to both comment and tell everyone that you left the comment. And a trailer doesn’t make sense for that, I thought.[1]
But thinking about the signoff requirement: you already have all the information you need from the next trailer, namely the signoff. In other words this:
[kh: Added tests]
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>Has the same information as this:
Comment: Added tests
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>Because the signoff order tells you who left the comment. So I was wondering to myself why this uniform approach wasn’t used.
† 1: Since the brackets become “non-trailer values” or something (git-interpret-trailers(1)), i.e. the discarded parts of the trailer block