]> git.ipfire.org Git - thirdparty/git.git/commit
merge-ort: setup basic internal data structures
authorElijah Newren <newren@gmail.com>
Sun, 13 Dec 2020 08:04:08 +0000 (08:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Dec 2020 22:18:19 +0000 (14:18 -0800)
commit5b59c3db059d85306ebeb680c4d322a69ee29fde
treed2a388c7a2426f6cdc0b57fb9a4151db0d29e9f4
parent6d37ca21651408b6d29b86a67d0179eb98629fd8
merge-ort: setup basic internal data structures

Set up some basic internal data structures.  The only carry-over from
merge-recursive.c is call_depth, though needed_rename_limit will be
added later.

The central piece of data will definitely be the strmap "paths", which
will map every relevant pathname under consideration to either a
merged_info or a conflict_info.  ("conflicted" is a strmap that is a
subset of "paths".)

merged_info contains all relevant information for a non-conflicted
entry.  conflict_info contains a merged_info, plus any additional
information about a conflict such as the higher orders stages involved
and the names of the paths those came from (handy once renames get
involved).  If an entry remains conflicted, the merged_info portion of a
conflict_info will later be filled with whatever version of the file
should be placed in the working directory (e.g. an as-merged-as-possible
variation that contains conflict markers).

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