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

[WIP PATCH 0/6] Merging with D/F conflicts

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 20, 2009, 05:06 UTC
Message-ID
<1253423175-6339-1-git-send-email-gitster@pobox.com>

I have been working on this on-and-off and it still is not finished, but I thought it would be a good place to stop, especially since this will not be part of the upcoming 1.6.5 anyway.

The first three patches are preparatory clean-ups.

The fourth patch roughly corresponds to Linus's 880386c (Prepare 'traverse_trees()' for D/F conflict lookahead, 2009-09-06), but it does implement multi-entry lookahead. It reveals why lookahead on the tree side alone is not sufficient by breaking a few tests.

The fifth one starts to compensate for the change in the tree side by preparing the side that walks the index for a similar lookahead mechanism, but it does not actually implement the lookahead yet.

The last one is a debugging patch.

This change has to break the output order (but not content) of the diff-index somewhat. If you had this:

    Index    Tree
    b        b-2/c
    b-2      b/d

the expected output order from diff-index is b, b-2, b-2/c, then b/d. But if you walk the tree and the index in parallel, we would end up showing b, b/d, b-2 and then b-2/c. A sad part of the story is that diff-index always emits D/F conflicted entries as two independent records, so it is rather a bad match to the unpack_trees() framework to begin with.

The patches are designed to apply on 79b4fde (Merge branch 'maint', 2009-09-03).

Junio C Hamano (6):
  diff-lib.c: fix misleading comments on oneway_diff()
  unpack-trees: typofix
  unpack_callback(): use unpack_failed() consistently
  traverse_trees(): handle D/F conflict case sanely
  unpack-trees.c: prepare for looking ahead in the index
  read-tree --debug-unpack
 builtin-read-tree.c |   36 +++++++
 cache.h             |    2 +
 diff-lib.c          |   20 +----
 tree-walk.c         |  277 +++++++++++++++++++++++++++++++++++++++++++--------
 unpack-trees.c      |  275 ++++++++++++++++++++++++++++++++++++++------------
 unpack-trees.h      |    3 +-
 6 files changed, 484 insertions(+), 129 deletions(-)
Next: Junio C Hamano
Message 1 of 7 in “Merging with D/F conflicts”
  1. 0/6 Merging with D/F conflictsJunio C Hamano, Sep 20, 2009
  2. 1/6 diff-lib.c: fix misleading comments on oneway_diff()Junio C Hamano, Sep 20, 2009
  3. 2/6 unpack-trees: typofixJunio C Hamano, Sep 20, 2009
  4. 3/6 unpack_callback(): use unpack_failed() consistentlyJunio C Hamano, Sep 20, 2009
  5. 4/6 traverse_trees(): handle D/F conflict case sanelyJunio C Hamano, Sep 20, 2009
  6. 5/6 unpack-trees.c: prepare for looking ahead in the indexJunio C Hamano, Sep 20, 2009
  7. 6/6 read-tree --debug-unpackJunio C Hamano, Sep 20, 2009

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.