]> git.ipfire.org Git - thirdparty/git.git/commit
merge-recursive: switch from (oid,mode) pairs to a diff_filespec
authorElijah Newren <newren@gmail.com>
Fri, 5 Apr 2019 15:00:22 +0000 (08:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Apr 2019 07:02:07 +0000 (16:02 +0900)
commit8daec1df03de7db13d5d551a8b54f32fc6021132
treeb1d0515d59a2999e240984f21149f89de15229ef
parente2d563dfa9951683a118e728dee99bd07a90e52d
merge-recursive: switch from (oid,mode) pairs to a diff_filespec

There was a significant inconsistency in the various parts of the API
used in merge-recursive; many places used a pair of (oid, mode) to track
file version/contents, while other parts used a diff_filespec (which
have an oid and mode embedded in it).  This inconsistency caused lots of
places to need to pack and unpack data to call into other functions.
This has been the subject of some past cleanups (see e.g. commit
0270a07ad0b2 ("merge-recursive: remove final remaining caller of
merge_file_one()", 2018-09-19)), but let's just remove the underlying
mess altogether by switching to use diff_filespec.

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