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

Re: [RFC PATCH 1/1] Define an extended tree format

From
Elijah Newren <newren@gmail.com>
Date
Oct 1, 2025, 21:21 UTC
Message-ID
<CABPp-BEAawZgDz+bBizUVz1=9XHE_g3vWGV17JooUes=JSmkwA@mail.gmail.com>
In-Reply-To
<20251001005814.846992-2-sandals@crustytoothpaste.net>

On Tue, Sep 30, 2025 at 5:58 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 8 quoted lines
>
> +Following that is a modified BER-encoded integer representing the type of
> +object and a modified BER-encoded integer consisting of flags.
> +
> +The object type is one of the following:
> +
> +0:: invalid
> +1:: conflict tree (only valid at top level)

I think there may have been some miscommunication. There was discussion around "at the toplevel" and "trees," but I believe "at the toplevel" was meant to refer to the commit itself -- specifically, for each commit, at the highest level of the objects it references (i.e., the commit object). The idea is that conflict information would be represented by multiple traditional toplevel trees (or possibly even commits?) recorded in the commit object, with no conflicts recorded within any individual tree. Instead, the existence of multiple distinct toplevel trees is what would signal a conflict.

Recording conflict information in trees rather than commits, as this proposal suggests (even if only at the toplevel tree), introduces a problem similar to what Martin mentioned yesterday regarding blobs. In particular, doing so would require every `git log` operation -- which wants to determine if a commit is conflicted so it can highlight it for users -- to walk not only the commits but also additional objects. Even if limited to just one extra level for toplevel trees, it effectively doubles the objects traversed for non-diffing log operations, impacting performance for everyone, not just those using conflict headers. I’d prefer to avoid imposing a performance penalty on users who don’t use any new features associated with first-class conflicts.

Additionally, I believe this approach would diverge from how jj and GitButler record conflicted commits. I’d rather follow the path they paved to benefit from their expertise and minimize (if not eliminate) any possible rework they need for continued interoperability with Git versions that gain features they first implemented.

We may find reason to revisit this as things progress, but for now, I don’t conflicted trees needs to be included in your modified tree proposal.

Previous: Jeff King
Message 10 of 10 in “Extended tree format for mixed submodules and conflicts”
  1. 0/1 Extended tree format for mixed submodules and conflictsbrian m. carlson, Oct 1, 2025
  2. 1/1 Define an extended tree formatbrian m. carlson, Oct 1, 2025
  3. Junio C HamanoOct 1, 2025
  4. Jeff KingOct 1, 2025
  5. Jeff KingOct 1, 2025
  6. Junio C HamanoOct 1, 2025
  7. brian m. carlsonOct 1, 2025
  8. Jeff KingOct 1, 2025
  9. Jeff KingOct 1, 2025
  10. Elijah NewrenOct 1, 2025

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.