On Wed, Sep 07, 2016 at 03:51:04PM -0700, Josh Triplett wrote:
> > This is still marked RFC, because there are really two approaches here,
> > and I'm not sure which one is better for "format-patch --base". I'd like
> > to get input from Xiaolong Ye (who worked on --base), and Josh Triplett
> > (who has proposed some patches in that area, and is presumably using
> > them).
> I'd love to see a more resilient patch-id mechanism, to make it easier
> to match up patches between branches. I don't think it makes sense to
> talk about the patch-id of a merge commit (though it might make sense
> for a merge which makes additional changes not present in any of the
> parents). Even if someone wants to match up merge commits with merge
> commits, I don't think that should happen via patch-id; I think that
> should happen in terms of "what patches does this merge introduce",
> without constructing a merge-patch-id via a Merkle tree of commit
> So, I think this patch series makes sense (modulo the comments about the
> commit message in patch 3). We already don't respect merge commits when
> doing format-patch; this seems consistent with that. If we ever make it
> possible for format-patch to handle merge commits, then we should also
> allow it to have merge commits as prerequisites.
Thanks for the input. I knew that format-patch doesn't show merge
commits, but I didn't realize that merges were skipped entirely for the
base preparation (but I see it now; there is a "rev.max_parents = 1"
setting in prepare_bases).
So this really doesn't change the output there at all. And in fact, the
if (commit_patch_id(commit, &diffopt, sha1, 0))
- die(_("cannot get patch id"))
should never hit that continue. It could be:
die("BUG: somehow a merge got fed to commit_patch_id?");
but the "continue" somehow seems like the right thing to me.
I'll wait another day or so for comments and then send the re-roll using