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

Re: The case for two trees in a commit ("How to make rebase less modal")

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Mar 1, 2018, 01:15 UTC
Message-ID
<a2c44a68-9fc6-5998-6d84-aba73ea65a61@ramsayjones.plus.com>
In-Reply-To
<CAGZ79ka6PXgs+JDicaQYWYSKgEthj0A-2bBaRcdp_0T2H+sREA@mail.gmail.com>
On 28/02/18 23:30, Stefan Beller wrote:
Show 14 quoted lines
> $ git hash-object --stdin -w -t commit <<EOF
> tree c70b4a33a0089f15eb3b38092832388d75293e86
> parent 105d5b91138ced892765a84e771a061ede8d63b8
> author Stefan Beller <sbeller@google.com> 1519859216 -0800
> committer Stefan Beller <sbeller@google.com> 1519859216 -0800
> tree 5495266479afc9a4bd9560e9feac465ed43fa63a
> test commit
> EOF
> 19abfc3bf1c5d782045acf23abdf7eed81e16669
> $ git fsck |grep 19abfc3bf1c5d782045acf23abdf7eed81e16669
> $
> 
> So it is technically possible to create a commit with two tree entries
> and fsck is not complaining.

Hmm, it's a while since I looked at that code, but I don't think you have a commit with two trees - the second 'tree <sha1>' line is just part of the commit message, isn't it?

ATB, Ramsay Jones

Previous: Stefan BellerNext: Brandon Williams
Message 2 of 8 in “The case for two trees in a commit ("How to make rebase less modal")”
  1. Stefan BellerFeb 28, 2018
  2. Ramsay JonesMar 1, 2018
  3. Brandon WilliamsMar 1, 2018
  4. Jeff KingMar 1, 2018
  5. Jacob KellerMar 1, 2018
  6. Junio C HamanoMar 1, 2018
  7. Junio C HamanoMar 1, 2018
  8. Jonathan NiederMar 1, 2018

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.