First, thanks everyone for the deluge of thoughtful comments! It's great to have so much enthusiasm about a patch :) I'm going to reply to all the comments in this one jumbo reply, rather than try to detangle the conversation threads this proposal has spawned. I've skipped over some comments that are repeats of others, but I think I've replied to every point. Do let me know if I've inadvertantly forgotten something you'd like me to consider. Robert Collins wrote: > On Fri, 2009-12-18 at 08:08 +0000, Andrew Bennetts wrote: > > > > * it is invoked for all changes where one side has changed the > > content, and the other side has changed the content or deleted the fil > > Why not 'all changes' ? I don't see why we should prevent hooks merging > even one-side changes in a more sophisticated manner. Hmm. I guess because if there's a clear one-side winner then I don't think of that as a “merge” (from the point of view of that file), and I didn't have a use-case for it. I was also trying to be mindful of keeping the performance cost minimal, as Aaron mentioned. You have given a use-case in a follow-up (“better merges of NEWS items by accounting for changes after a release”), and that would definitely be nice to have. I'll have a play and see what it would take to make OTHER-only changes go via the hook, as your followup suggests. It sounds like no-one is strongly interested in THIS-only at this point, so I'm happy to ignore that for this patch. Also, I know it's a bit of a cop-out answer, but a plugin could always implement a whole new Merger if the hook isn't powerful enough... John's reply to you said: ] I assume this is because the merge code itself splits these cases. Files ] with clear winners don't get passed into the Merger code. Also, there is ] bidirectional issues. Right, I definitely did want to keep the changes as minimal as possible because I'm not deeply familiar with the structure of the merge code, but I do get the sense that it would be easy to accidentally introduce bugs if I rearranged things. I'm not certain what you mean by bidirectional issues? I think I can make some educated guesses, but I'd rather you explained for me :) > > * should a hook function be able to have some control over the > > emission of THIS/BASE/OTHER files when it results in a conflict, or > > over their contents of those files? > > I think yes, but that can come later. Cool. James Westby wrote: > On Fri, 18 Dec 2009 08:08:34 -0000, Andrew Bennetts