summaryrefslogtreecommitdiff
path: root/gitweb/static/gitweb.css
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2026-06-14 06:37:25 +0000
committerJunio C Hamano <gitster@pobox.com>2026-06-14 07:50:47 -0700
commit43a5fa7f5a9b7c44dd958a21368d690fa55d4f50 (patch)
treea0d2875755d5105d57a0f25a2b9907e58641bc44 /gitweb/static/gitweb.css
parent83ae606c9838b06bde36479756de2ab75b6fbb96 (diff)
merge-ort: abort merge when trees have duplicate entries
Trees with duplicate entries are malformed; fsck reports "contains duplicate file entries" for them. merge-ort has from the beginning assumed that we would never hit such trees. It was written with the assumption that traverse_trees() calls collect_merge_info_callback() at most once per path. The "sanity checks" in that callback (added in d2bc1994f363 (merge-ort: implement a very basic collect_merge_info(), 2020-12-13)) verify properties of each individual call but not that invariant. The strmap_put() in setup_path_info() silently overwrites the entry from any prior call for the same path, because it assumed there would be no other path. Unfortunately, supplemental data structures for various optimizations could still be tweaked before the extra paths were overwritten, and those data structures not matching expected state could trip various assertions. Change the return type of setup_path_info() from void to int to allow us to detect this case, and abort the merge with a clear error message when it occurs. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/gitweb.css')
0 files changed, 0 insertions, 0 deletions