Pain points in Git's patch flow

Felipe Contreras felipe.contreras at
Sat May 1 06:35:56 AEST 2021

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 <cornelius.weig at>
  Jeff King <peff at>
  Junio C Hamano <gitster at>
  Johannes Schindelin <Johannes.Schindelin at>

However, with git-related I get this:

  Junio C Hamano <gitster at> (signer: 62%, author: 37%)
  Johannes Schindelin <Johannes.Schindelin at> (author: 37%)
  Jeff King <peff at> (reviewer: 12%, author: 12%)
  Cornelius Weig <cornelius.weig at> (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 <gitster at> (signer: 80%, author: 20%)
  Jeff King <peff at> (reviewer: 10%, author: 30%)
  Johannes Schindelin <Johannes.Schindelin at> (author: 30%)
  Patrick Steinhardt <ps at> (author: 10%)
  Cornelius Weig <cornelius.weig at> (author: 10%)

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



Felipe Contreras

More information about the Patchwork mailing list