On Tue, Aug 19, 2008 at 12:19:09PM -0700, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Since the latter is what everybody else ("checkout -m", "revert", > "cherry-pick", "am -3", "stash apply") should be using, I think it is > pretty much up to "git-merge" and "git-merge-recursive" implementations > how the caller of merge_recursive() function is structured. I suspect > that you would not need two separate functions, _setup() and _generic(), > for these two codepaths, but I didn't look closely. Sure, I can avoid _generic() and use merge_recursive() directly, that's why I asked. > And make_virtual_commit() should become static inside merge_recursive.c; > use of these fake commits is strictly an internal implementation issue of > how merge_recursive() function works and does not concern the caller, does > it? Not exactly. builtin-merge-recursive uses get_ref() - which should not be in merge-recursive.c IMHO - and get_ref() uses make_virtual_commit(). merge_recursive() itself takes commits, so it can be only static if we copy it builtin-merge-recursive as well, causing a code duplication. Or have I missed something here? Thanks.
Attachment:
pgpgva0MIZxTj.pgp
Description: PGP signature