Code

merge-recursive: New function to assist resolving renames in-core only
authorElijah Newren <newren@gmail.com>
Mon, 20 Sep 2010 08:28:54 +0000 (02:28 -0600)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Sep 2010 00:37:03 +0000 (17:37 -0700)
commit2ff739f9d2fd2f34e7a7bfb9b5f2d1d2b2ec5326
tree3bc15a3797e3e9b33d69ef09aaeaf5d23f2a0584
parent25c3936349ba052f0c7e9ba3ce138b89abcae6ee
merge-recursive: New function to assist resolving renames in-core only

process_renames() and process_entry() have nearly identical code for
doing three-way file merging to resolve content changes.  Since we are
already deferring some of the current rename handling in order to better
handle D/F conflicts, it seems to make sense to defer content merging as
well and remove the (nearly) duplicated code sections for handling this
merging.

To facilitate this process, add a new update_stages_and_entry() function
which will map the higher stage index entries from two files involved in a
rename into the resulting rename destination's index entries, and update
the associated stage_data structure.

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