git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/5] Duplicate entry hardening

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Apr 21, 2026, 00:26 UTC
Message-ID
<pull.2096.git.1776731171.gitgitgadget@gmail.com>

We had some corrupt trees with duplicate entries in real world repositories, which triggered an assertion failure in merge-ort. Further, the corrupt tree creation in the third party tool would have been avoided had verify_cache() correctly checked for D/F conflicts. Provide fixes for both issues, including 3 preparatory changes for the merge-ort fix.

Elijah Newren (5):
  merge-ort: propagate callback errors from traverse_trees_wrapper()
  merge-ort: drop unnecessary show_all_errors from collect_merge_info()
  merge-ort: free diff pairs queue in clear_or_reinit_internal_opts()
  merge-ort: abort merge when trees have duplicate entries
  cache-tree: fix verify_cache() to catch non-adjacent D/F conflicts
 cache-tree.c                         | 46 ++++++++++++++--
 merge-ort.c                          | 78 ++++++++++++++++------------
 t/meson.build                        |  1 +
 t/t0093-direct-index-write.pl        | 38 ++++++++++++++
 t/t0093-verify-cache-df-gap.sh       | 59 +++++++++++++++++++++
 t/t6422-merge-rename-corner-cases.sh | 54 +++++++++++++++++++
 6 files changed, 239 insertions(+), 37 deletions(-)
 create mode 100644 t/t0093-direct-index-write.pl
 create mode 100755 t/t0093-verify-cache-df-gap.sh
base-commit: e8955061076952cc5eab0300424fc48b601fe12d
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2096%2Fnewren%2Fduplicate-entry-hardening-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2096/newren/duplicate-entry-hardening-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2096
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 23 in “Duplicate entry hardening”
  1. 0/5 Duplicate entry hardeningElijah Newren via GitGitGadget, Apr 21, 2026
  2. 1/5 merge-ort: propagate callback errors from traverse_trees_wrapper()Elijah Newren via GitGitGadget, Apr 21, 2026
  3. Junio C HamanoJun 1, 2026
  4. Elijah NewrenJun 14, 2026
  5. 2/5 merge-ort: drop unnecessary show_all_errors from collect_merge_info()Elijah Newren via GitGitGadget, Apr 21, 2026
  6. Junio C HamanoJun 1, 2026
  7. 3/5 merge-ort: free diff pairs queue in clear_or_reinit_internal_opts()Elijah Newren via GitGitGadget, Apr 21, 2026
  8. 4/5 merge-ort: abort merge when trees have duplicate entriesElijah Newren via GitGitGadget, Apr 21, 2026
  9. Junio C HamanoJun 1, 2026
  10. 5/5 cache-tree: fix verify_cache() to catch non-adjacent D/F conflictsElijah Newren via GitGitGadget, Apr 21, 2026
  11. Junio C HamanoJun 1, 2026
  12. Elijah NewrenJun 14, 2026
  13. Junio C HamanoJun 1, 2026
  14. Patrick SteinhardtJun 1, 2026
  15. Automated reviews by AI (was Re: [PATCH 0/5] Duplicate entry hardening)Christian Couder, Jun 12, 2026
  16. Junio C HamanoJun 12, 2026
  17. 0/5 Duplicate entry hardeningElijah Newren via GitGitGadget, Jun 14, 2026
  18. 1/5 merge-ort: propagate callback errors from traverse_trees_wrapper()Elijah Newren via GitGitGadget, Jun 14, 2026
  19. 2/5 merge-ort: drop unnecessary show_all_errors from collect_merge_info()Elijah Newren via GitGitGadget, Jun 14, 2026
  20. 3/5 merge-ort: free diff pairs queue in clear_or_reinit_internal_opts()Elijah Newren via GitGitGadget, Jun 14, 2026
  21. 4/5 merge-ort: abort merge when trees have duplicate entriesElijah Newren via GitGitGadget, Jun 14, 2026
  22. 5/5 cache-tree: fix verify_cache() to catch non-adjacent D/F conflictsElijah Newren via GitGitGadget, Jun 14, 2026
  23. Junio C HamanoJun 14, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.