summaryrefslogtreecommitdiff
path: root/archive.h
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2020-05-10 18:12:16 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-11 08:40:28 -0700
commit9068cfb20f5699fd639a559af14affaefe43a812 (patch)
tree5c58d3b928060326346888b9e0fb05a019d18059 /archive.h
parentGit 2.25.4 (diff)
downloadtgif-9068cfb20f5699fd639a559af14affaefe43a812.tar.xz
fsck: report non-consecutive duplicate names in trees
Tree entries are sorted in path order, meaning that directory names get a slash ('/') appended implicitly. Git fsck checks if trees contains consecutive duplicates, but due to that ordering there can be non-consecutive duplicates as well if one of them is a directory and the other one isn't. Such a tree cannot be fully checked out. Find these duplicates by recording candidate file names on a stack and check candidate directory names against that stack to find matches. Suggested-by: Brandon Williams <bwilliamseng@gmail.com> Original-test-by: Brandon Williams <bwilliamseng@gmail.com> Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive.h')
0 files changed, 0 insertions, 0 deletions