When MFCing a set of commits, I want to know whether there are any fixup
commits that reference a commit that I'm MFCing. This script provides a
way to do that. In particular, given one or more revisions as
arguments, it finds the closure of commits which fix up the original
revisions. All it does is print them to stdout, so one can run
something like
$ git cherry-pick -x $(mfc-helper 9a4131629bb3083ddc02a32950e4eb4806a07710~..3fa552149885766b009d95d20bdf651786fac7b7)
and be confident that I picked up any fixups. Of course, this assumes
that developers are tagging their commits properly, but a growing number
are doing this. In the future we could alternately annotate such
information with git notes.
It's also useful to know whether there are any fixup commits missing
from a stable branch. When run in a stable branch checkout without any
arguments, this script finds all cherry-picked commits that have
un-cherry-picked fixups in an upstream branch (anon/main by default).
Right now there's a number of such commits on both stable/13 and 14.
Some are false positives (e.g., because developers squashed multiple
MFCs into a single commit for some reason), and some are unimportant,
but there are some real missed fixups.