Subject: Re: Pain points in Git's patch flow

From: Felipe Contreras <[email-masked]>
Date: Fri, 30 Apr 2021 15:35:56 -0500

brian m. carlson wrote:
> I find I'm often unsure what to put in the cover letter for a v2 or
> subsequent series.  Clearly people don't want the same thing as v1, but
> I rarely have useful information other than a summary of changes.
> 
> I have tooling to automatically generate the proper range for
> range-diffs in cover letters, but that tooling requires some sort of
> manual timestamp, which means I need to go search for my previous series
> to find the date and generate the range diff, or if I'm in a rush, I
> just have to omit it.  This can take some time, having to guess what I
> named the cover letter the last time and search for it in a mailbox with
> a 6-digit quantity of mails[0].

I wrote a tool to deal precisely with that: git-send-series[1]. All the
metadata in the patch series is stored in a text file (version, subject, cc,
cover letter, etc.).

So when you want to send the next version of your series you just do
`git send-series` and it deals with all that tedious stuff
automatically. You just need to update the cover letter.

It also keeps track of the previous versions of your series in order to
automatically generate the range-diff.

> In general, I have trouble keeping track of the patch mails I've sent.
> I do definitely need to refer to them later, but I don't generally keep
> them around on my system since they tend to duplicate my repository, so
> I end up needing to find them in my mailbox, which as mentioned, is
> slow and error prone.

I have my mailbox stored in my machine syncronized with isync[2], and
indexed with notmuch[3]. I can view all mails I've ever sent instantly
with a simple search:

  nmm tag:git tag:sent subject:PATCH

> I find that the git-contacts script is often not helpful to find
> reviewers.

git-contacts is a subpar rewrite of my original script: git-related[4].

Using git-contacts on your last merged patch I get this:

  Cornelius Weig <[email-masked]>
  Jeff King <[email-masked]>
  Junio C Hamano <[email-masked]>
  Johannes Schindelin <[email-masked]>

However, with git-related I get this:

  Junio C Hamano <[email-masked]> (signer: 62%, author: 37%)
  Johannes Schindelin <[email-masked]> (author: 37%)
  Jeff King <[email-masked]> (reviewer: 12%, author: 12%)
  Cornelius Weig <[email-masked]> (author: 12%)

Which is much more useful.

However, you actually have options to catch more changes:

  % git related --min-percent=5 --since=10-years-ago 75555676ad -1
  Junio C Hamano <[email-masked]> (signer: 80%, author: 20%)
  Jeff King <[email-masked]> (reviewer: 10%, author: 30%)
  Johannes Schindelin <[email-masked]> (author: 30%)
  Patrick Steinhardt <[email-masked]> (author: 10%)
  Cornelius Weig <[email-masked]> (author: 10%)

This may not solve your paticular complaint, but it's clearly superior.

Cheers.

[1] https://github.com/felipec/git-send-series
[2] https://isync.sourceforge.io/
[3] https://notmuchmail.org/
[4] https://github.com/felipec/git-related

-- 
Felipe Contreras