merge-recursive: make "Auto-merging" comment show for other merges
commit05cf21eba29d18eb6cdece25613c6b1b036872d0
authorElijah Newren <newren@gmail.com>
Thu, 19 Apr 2018 17:58:22 +0000 (19 10:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 May 2018 07:11:00 +0000 (8 16:11 +0900)
tree43ee6a8b86c2086c87dc33bf4594999a0fe4e64a
parent277292d5ae27993d36f35fdd8d561c369b1e0962
merge-recursive: make "Auto-merging" comment show for other merges

Previously, merge_content() would print "Auto-merging" whenever the final
content and mode aren't already available from HEAD.  There are a few
problems with this:

  1) There are other code paths doing merges that should probably have the
     same message printed, in particular rename/rename(2to1) which cannot
     call into the normal rename logic.

  2) If both sides of the merge have modifications, then a content merge
     is needed.  It may turn out that the end result matches one of the
     sides (because the other only had a subset of the same changes), but
     the merge was still needed.  Currently, the message will not print in
     that case, though it seems like it should.

Move the printing of this message to merge_file_1() in order to address
both issues.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c