summaryrefslogtreecommitdiff
path: root/mergetools/kompare
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-09-08 11:23:56 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-09 15:49:04 -0700
commitad90da73513d7b0055e47c6918e1d75c6165fa69 (patch)
treeb3083c988cfe316929ffcd1556292181855688c1 /mergetools/kompare
parentsparse-checkout: clear tracked sparse dirs (diff)
downloadtgif-ad90da73513d7b0055e47c6918e1d75c6165fa69.tar.xz
diff: ignore sparse paths in diffstat
The diff_populate_filespec() method is used to describe the diff after a merge operation is complete. In order to avoid expanding a sparse index, the reuse_worktree_file() needs to be adapted to ignore files that are outside of the sparse-checkout cone. The file names and OIDs used for this check come from the merged tree in the case of the ORT strategy, not the index, hence the ability to look into these paths without having already expanded the index. The work done by reuse_worktree_file() is only an optimization, and requires the file being on disk for it to be of any value. Thus, it is safe to exit the method early if we do not expect the file on disk. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mergetools/kompare')
0 files changed, 0 insertions, 0 deletions