Paolo Bonzini [off-list ref] writes:
#! /bin/sh
# git-merge-after-amend <branch>
#
# Makes it possible to do a fast-forward merge of <branch>
# into HEAD, assuming that the first diverging commit of <branch>
# is an --amend'ed version of the first diverging commit of HEAD.
Can this strong special case limitation "only the first one can be the
amend" somehow be loosened? Otherwise I suspect it would not be useful as
a general solution.