]> git.ipfire.org Git - thirdparty/git.git/commit - diffcore-rename.c
diffcore-rename: add a mapping of destination names to their indices
authorElijah Newren <newren@gmail.com>
Sat, 27 Feb 2021 00:30:41 +0000 (00:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 27 Feb 2021 01:53:11 +0000 (17:53 -0800)
commitae8cf74d3f9e76332138ee8bb911b3fa53f17bbf
tree58a013809c1d9058ec520708fe2371fde1a53bb3
parentbde8b9f34c57f0ad567890de181ff94741ef2cbd
diffcore-rename: add a mapping of destination names to their indices

Compute a mapping of full filename to the index within rename_dst where
that filename is found, and store it in idx_map.  idx_possible_rename()
needs this to quickly finding an array entry in rename_dst given the
pathname.

While at it, add placeholder initializations for dir_rename_count and
dir_rename_guess; these will be more fully populated in subsequent
commits.

Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-rename.c