]> git.ipfire.org Git - thirdparty/git.git/commit - merge-recursive.c
merge-recursive: rename conflict_rename_*() family of functions
authorElijah Newren <newren@gmail.com>
Sun, 10 Jun 2018 04:16:15 +0000 (21:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jun 2018 17:22:57 +0000 (10:22 -0700)
commit8ebe7b057ad866e027365526782cd2e42a0bd106
treeba7b36b42f325e11911ad3a453aa02fed702e667
parent5455c33839c6c5d248007ad2b49e8a225e9f47fa
merge-recursive: rename conflict_rename_*() family of functions

These functions were added because processing of these conflicts needed
to be deferred until process_entry() in order to get D/F conflicts and
such right.  The number of these has grown over time, and now include
some whose name is misleading:
  * conflict_rename_normal() is for handling normal file renames; a
    typical rename may need content merging, but we expect conflicts
    from that to be more the exception than the rule.
  * conflict_rename_via_dir() will not be a conflict; it was just an
    add that turned into a move due to directory rename detection.
    (If there was a file in the way of the move, that would have been
    detected and reported earlier.)
  * conflict_rename_rename_2to1 and conflict_rename_add (the latter
    of which doesn't exist yet but has been submitted before and I
    intend to resend) technically might not be conflicts if the
    colliding paths happen to match exactly.
Rename this family of functions to handle_rename_*().

Also rename handle_renames() to detect_and_process_renames() both to make
it clearer what it does, and to differentiate it as a pre-processing step
from all the handle_rename_*() functions which are called from
process_entry().

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