git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
@ 2017-10-30 18:29 Stefan Beller
  2017-11-01  7:14 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Beller @ 2017-10-30 18:29 UTC (permalink / raw)
  To: Jeff King
  Cc: Philip Oakley, Junio C Hamano, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Mon, Oct 30, 2017 at 11:08 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Oct 23, 2017 at 01:26:41PM +0100, Philip Oakley wrote:
>
>> > Totally offtopic, but is it only me who finds these "section
>> > headers" in cover letters from some people irritating and/or
>> > jarring?
>>
>> Personally I find that, for significant patch series, that clearly breaking
>> out these distinct sections is of advantage. At this stage (the very first
>> patch 0/n) there is no specific conversation, so the subject line is a short
>> 'hello' to the topic, and then the contributor is (it is to be hoped)
>> setting out their proposal in a clear manner.
>>
>> So I do like these headings for larger series, though there is some
>> judgement to be made as to when the subject line alone is sufficient.
>
> I can live with fancily-formatted cover letters. BUT. I would say if
> your cover letter is getting quite long, you might consider whether some
> of its content ought to be going elsewhere (either into commit messages
> themselves, or into a design document or other place inside the repo).

I am of the opinion that in an ideal workflow the cover letter would be
part of the merge commit message. It may even be editorialized or
annotated by the maintainer performing the merge, but not necessarily so.

Currently I rarely pay attention to merges, because they are not exciting
(in a good way). I mostly know the texts that Junio puts into the merge
message[1] from the cooking email, and otherwise there is not much
information added there.

However looking at *what* Junio puts there, is "why is this worthwhile
to merge from the *projects* point of view?", whereas the cover letter
most of the time talks about "Why the *contributor* wants this merged".
Often these are subtly different, so it would be nice to have these
two competing views around.

[1] e.g. cf. da15b78e52 Merge branch 'jk/ui-color-always-to-auto'

>> As a separate follow on, one thing that does annoy me is that in subsequent
>> versions of the various patch series, folk tend to drop all explanation of
>> why the series is of any relevance, leaving just the 'changed since last
>> time' part. This means that new readers who try and pick up / review /
>> contribute to a series later on in its development are not told the purpose.
>> When the list is active it can, accidentally, do a disservice to the
>> potential contributors who may feel that only core contributors are able to
>> contribute.
>
> I actually have the opposite opinion. I find it annoying to have to wade
> through the same unchanged content for each round just to find the
> little snippet of "here's what's changed".

Would you be happier if the "What changed?" goes first[2]?
Though I think whether to just reply to the previous version, put an
explicit link or copy the cover letter verbatim from last time is up
for discussion. I tent to think a link ought to be enough, because
those familiar with the topic would not follow it (so they have no
additional burden compared to direct copy), and new comers to
that topic may be ok with links .

[2] I tried following that style, e.g.
https://public-inbox.org/git/20170630205310.7380-1-sbeller@google.com/


> I don't mind following a link to the previous iteration to read the
> back-story if I wasn't involved (it's a good idea to do that anyway to
> see what previous reviews have already discussed).

Such a back story would make an excellent merge message, too,
as it explains the big picture more accurately, often shows
alternatives considered etc.

Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-10-30 18:29 On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm] Stefan Beller
@ 2017-11-01  7:14 ` Jeff King
  2017-11-01 16:42   ` Stefan Beller
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2017-11-01  7:14 UTC (permalink / raw)
  To: Stefan Beller
  Cc: Philip Oakley, Junio C Hamano, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Mon, Oct 30, 2017 at 11:29:37AM -0700, Stefan Beller wrote:

> > I can live with fancily-formatted cover letters. BUT. I would say if
> > your cover letter is getting quite long, you might consider whether some
> > of its content ought to be going elsewhere (either into commit messages
> > themselves, or into a design document or other place inside the repo).
> 
> I am of the opinion that in an ideal workflow the cover letter would be
> part of the merge commit message. It may even be editorialized or
> annotated by the maintainer performing the merge, but not necessarily so.
> 
> Currently I rarely pay attention to merges, because they are not exciting
> (in a good way). I mostly know the texts that Junio puts into the merge
> message[1] from the cooking email, and otherwise there is not much
> information added there.

Yes, I'd agree that for some topics it would be nice for the merge
message to give any "big picture" details that wouldn't have made sense
inside a single commit message.

> However looking at *what* Junio puts there, is "why is this worthwhile
> to merge from the *projects* point of view?", whereas the cover letter
> most of the time talks about "Why the *contributor* wants this merged".
> Often these are subtly different, so it would be nice to have these
> two competing views around.

Yes, there's really no reason we couldn't have both (e.g., Junio's
maintainer synopsis followed by a marker, and then the original author's
cover letter).

The workflow within git is a little awkward, though. You'd want to pick
up the cover letter information via "git am" when the branch is applied.
But it doesn't go into a commit message until the merge. So where is it
stored in the meantime? You'd need a branch->msg key/value store of some
kind.

Junio's workflow now actually uses the "pu" merges as the storage
location while a topic is working its way up. But there's a period
between "am" and running the integration cycle where it would need to go
somewhere else.

One other consideration is that the cover letter may get updated between
rounds (e.g., because you changed patches in response to review, or even
to discuss alternatives that came up and were rejected). That places a
burden on the maintainer to update the prospective merge-message.

So it may make more sense just to cross-reference those merges with the
topics that spawned them on the mailing list. I.e., instead of copying
the cover letter contents, just record the message-id (and update it
whenever a new iteration of a topic is picked up via "git am"). That
lets you get the cover letter information _and_ see any discussion
or review around the patch. (But it has the same "where does this
message-id go until the merge-commit is created" question).

> > I actually have the opposite opinion. I find it annoying to have to wade
> > through the same unchanged content for each round just to find the
> > little snippet of "here's what's changed".
> 
> Would you be happier if the "What changed?" goes first[2]?

Yes, I think that would help. And marking the start of "old" information
clearly so that the reader knows when they can stop looking.

But then links do that pretty well, too (it's easy to choose whether to
follow them or not).

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-01  7:14 ` Jeff King
@ 2017-11-01 16:42   ` Stefan Beller
  2017-11-01 22:31     ` Stefan Beller
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Beller @ 2017-11-01 16:42 UTC (permalink / raw)
  To: Jeff King
  Cc: Philip Oakley, Junio C Hamano, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Wed, Nov 1, 2017 at 12:14 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Oct 30, 2017 at 11:29:37AM -0700, Stefan Beller wrote:
>
>> > I can live with fancily-formatted cover letters. BUT. I would say if
>> > your cover letter is getting quite long, you might consider whether some
>> > of its content ought to be going elsewhere (either into commit messages
>> > themselves, or into a design document or other place inside the repo).
>>
>> I am of the opinion that in an ideal workflow the cover letter would be
>> part of the merge commit message. It may even be editorialized or
>> annotated by the maintainer performing the merge, but not necessarily so.
>>
>> Currently I rarely pay attention to merges, because they are not exciting
>> (in a good way). I mostly know the texts that Junio puts into the merge
>> message[1] from the cooking email, and otherwise there is not much
>> information added there.
>
> Yes, I'd agree that for some topics it would be nice for the merge
> message to give any "big picture" details that wouldn't have made sense
> inside a single commit message.
>
>> However looking at *what* Junio puts there, is "why is this worthwhile
>> to merge from the *projects* point of view?", whereas the cover letter
>> most of the time talks about "Why the *contributor* wants this merged".
>> Often these are subtly different, so it would be nice to have these
>> two competing views around.
>
> Yes, there's really no reason we couldn't have both (e.g., Junio's
> maintainer synopsis followed by a marker, and then the original author's
> cover letter).
>
> The workflow within git is a little awkward, though. You'd want to pick
> up the cover letter information via "git am" when the branch is applied.
> But it doesn't go into a commit message until the merge. So where is it
> stored in the meantime? You'd need a branch->msg key/value store of some
> kind.

branch.<name.>description already exists on the contributors side.
Maybe we can teach git-am to populate that field with either the
message-id only (of the coverletter), or the cover letter text.

Or we introduce a git-am hook, that could populate the value
of that setting.

Once we have that setting there, our man page of git-merge claims
merging pays attention to that setting via git-fmt-merge-msg.

I guess if we put these pieces in place, it may be easier to convince
Junio to try out that workflow.

> Junio's workflow now actually uses the "pu" merges as the storage
> location while a topic is working its way up. But there's a period
> between "am" and running the integration cycle where it would need to go
> somewhere else.

An empty commit on top is a clunky idea. (Though from the data model,
that empty commit "just learns about a new parent" in the merge process).
I think the branch description field will do.

> One other consideration is that the cover letter may get updated between
> rounds (e.g., because you changed patches in response to review, or even
> to discuss alternatives that came up and were rejected). That places a
> burden on the maintainer to update the prospective merge-message.

if there was a git-am hook, that could be smart enough to *always*
update the branch description to the latest cover letter, (or even just
the latest patch of the series, if just the last patch changed)

> So it may make more sense just to cross-reference those merges with the
> topics that spawned them on the mailing list. I.e., instead of copying
> the cover letter contents, just record the message-id (and update it
> whenever a new iteration of a topic is picked up via "git am"). That
> lets you get the cover letter information _and_ see any discussion
> or review around the patch.

That sounds good.

Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-01 16:42   ` Stefan Beller
@ 2017-11-01 22:31     ` Stefan Beller
  2017-11-02  7:22       ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Beller @ 2017-11-01 22:31 UTC (permalink / raw)
  To: Jeff King
  Cc: Philip Oakley, Junio C Hamano, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Wed, Nov 1, 2017 at 9:42 AM, Stefan Beller <sbeller@google.com> wrote:

>> So it may make more sense just to cross-reference those merges with the
>> topics that spawned them on the mailing list. I.e., instead of copying
>> the cover letter contents, just record the message-id (and update it
>> whenever a new iteration of a topic is picked up via "git am"). That
>> lets you get the cover letter information _and_ see any discussion
>> or review around the patch.
>
> That sounds good.
>

Actually I just found out about `am.messageId`, which adds the individual
message id as a footer. Maybe that is good enough? (Though it would
clutter every commit, not just the merge commits)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-01 22:31     ` Stefan Beller
@ 2017-11-02  7:22       ` Jeff King
  2017-11-02  7:48         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2017-11-02  7:22 UTC (permalink / raw)
  To: Stefan Beller
  Cc: Philip Oakley, Junio C Hamano, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Wed, Nov 01, 2017 at 03:31:42PM -0700, Stefan Beller wrote:

> On Wed, Nov 1, 2017 at 9:42 AM, Stefan Beller <sbeller@google.com> wrote:
> 
> >> So it may make more sense just to cross-reference those merges with the
> >> topics that spawned them on the mailing list. I.e., instead of copying
> >> the cover letter contents, just record the message-id (and update it
> >> whenever a new iteration of a topic is picked up via "git am"). That
> >> lets you get the cover letter information _and_ see any discussion
> >> or review around the patch.
> >
> > That sounds good.
> 
> Actually I just found out about `am.messageId`, which adds the individual
> message id as a footer. Maybe that is good enough? (Though it would
> clutter every commit, not just the merge commits)

It also means digging around to find the apex of the thread (though
generally that can be done automatically with sufficiently smart
tooling; I think public-inbox can do it pretty easily).

I also like the idea that I could read "log --first-parent" to get an
overview of the topics (with links). But probably associating a message
id with each patch smooths out a lot of corner cases (it sidesteps the
"where do you store it until the commit is made" question, and it
works when there's no cover letter). And it gives enough hint for other
software to figure out everything else.

If the clutter is too much, it could also go into a git-notes ref
(that's not already implemented, but it seems like it would be pretty
easy to teach "git am" to do that).

For a while, Thomas Rast used a script to heuristically create that
mapping via git-notes after the fact. But if "git am" just did it
automatically on behalf of Junio, that would be more robust.

I will admit that I found I didn't use the mapping generated by Thomas's
script all that much. But I do keep a local mailing list index and often
search for the commit's subject as a mail subject, which roughly
accomplishes the same thing.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-02  7:22       ` Jeff King
@ 2017-11-02  7:48         ` Junio C Hamano
  2017-11-02  8:01           ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2017-11-02  7:48 UTC (permalink / raw)
  To: Jeff King
  Cc: Stefan Beller, Philip Oakley, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

Jeff King <peff@peff.net> writes:

> If the clutter is too much, it could also go into a git-notes ref
> (that's not already implemented, but it seems like it would be pretty
> easy to teach "git am" to do that).

FWIW, that is what I use a notes ref "amlog" for.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-02  7:48         ` Junio C Hamano
@ 2017-11-02  8:01           ` Jeff King
  2017-11-02 18:03             ` Stefan Beller
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2017-11-02  8:01 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Stefan Beller, Philip Oakley, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Thu, Nov 02, 2017 at 04:48:45PM +0900, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > If the clutter is too much, it could also go into a git-notes ref
> > (that's not already implemented, but it seems like it would be pretty
> > easy to teach "git am" to do that).
> 
> FWIW, that is what I use a notes ref "amlog" for.

Right, I completely forgot that you were already doing that. So jumping
to the thread for a commit is basically:

  $browser $(git notes --ref=amlog show $commit |
             perl -pe 's{Message-Id: <(.*)>}{https://public-inbox.org/git/$1/t}')

(Or whichever archive you prefer to use). Thanks for the reminder.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]
  2017-11-02  8:01           ` Jeff King
@ 2017-11-02 18:03             ` Stefan Beller
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Beller @ 2017-11-02 18:03 UTC (permalink / raw)
  To: Jeff King
  Cc: Junio C Hamano, Philip Oakley, Christian Couder, git, Ben Peart,
	Jonathan Tan, Nguyen Thai Ngoc Duy, Mike Hommey, Lars Schneider,
	Eric Wong, Christian Couder

On Thu, Nov 2, 2017 at 1:01 AM, Jeff King <peff@peff.net> wrote:
> On Thu, Nov 02, 2017 at 04:48:45PM +0900, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>>
>> > If the clutter is too much, it could also go into a git-notes ref
>> > (that's not already implemented, but it seems like it would be pretty
>> > easy to teach "git am" to do that).
>>
>> FWIW, that is what I use a notes ref "amlog" for.
>
> Right, I completely forgot that you were already doing that. So jumping
> to the thread for a commit is basically:
>
>   $browser $(git notes --ref=amlog show $commit |
>              perl -pe 's{Message-Id: <(.*)>}{https://public-inbox.org/git/$1/t}')
>
> (Or whichever archive you prefer to use). Thanks for the reminder.
>

Thanks from my side as well. I did not pay attention when this was
introduced and see the notes ref for the first time today.

I'll incorporate that into my digging repertoire.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-02 18:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30 18:29 On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm] Stefan Beller
2017-11-01  7:14 ` Jeff King
2017-11-01 16:42   ` Stefan Beller
2017-11-01 22:31     ` Stefan Beller
2017-11-02  7:22       ` Jeff King
2017-11-02  7:48         ` Junio C Hamano
2017-11-02  8:01           ` Jeff King
2017-11-02 18:03             ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).