Re: Linking topic merges to mailing list threads
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Sep 30, 2024, 20:41 UTC
- Message-ID
- <f4d26c91-6fb6-4c9a-b629-d75b572c39d2@app.fastmail.com>
- In-Reply-To
- <CAJoAoZ=4ARuH3aHGe5yC_Xcnou_c396q_ZienYPY7YnEzZcyEg@mail.gmail.com>
Like Junio explained refs/notes/amlog is a hidden gem for patch provenance.
Show 8 quoted lines
> Hi all, > > We've been wanting to gather metrics on Git's code review process - > how long it takes from first contact on list to merge, how many > iterations are needed, time between iterations, etc. One missing link > is the actual merge time in `next` and `master` - a human can infer > the link between the patch and the mailing list thread, but it's more > challenging for a script to do it.
Is the starting point the email? I think you could fish out the Message-ID and do a grep inside the notes tree
git grep --fixed-string --name-only \
'00a9fe6b7d77c16c9fd6dfe746aacf9068a76942.1726206484.git.ps@pks.im' \
refs/notes/amlog --(the resulting hash will need to be cleaned: fanned directory layout[1])
Then try one commit at a time (because there might be unreachable commits from rewrite operations) using git-when-merged(1):[2]
git when-merged --log 7cd8f1cc6e17af54fb78768c259a615b1ccc0205 next
git when-merged --log 7cd8f1cc6e17af54fb78768c259a615b1ccc0205 master† 1: e.g. 7c/d8/f1cc6e17af54fb78768c259a615b1ccc0205 🔗 2: https://github.com/mhagger/git-when-merged
-- Kristoffer Haugsbakk