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

Re: What's cooking in git.git (Oct 2020, #02; Fri, 9)

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 9, 2020, 16:15 UTC
Message-ID
<512a3dc5-4937-8679-c4c8-5144ac50450b@gmail.com>
In-Reply-To
<xmqq362nv18o.fsf@gitster.c.googlers.com>
On 10/9/2020 11:59 AM, Junio C Hamano wrote:
Show 9 quoted lines
> * ds/commit-graph-merging-fix (2020-10-08) 1 commit
>  - commit-graph: ignore duplicates when merging layers
> 
>  When "git commit-graph" detects the same commit recorded more than
>  once while it is merging the layers, it used to die.  The code now
>  ignores all but one of them and continues.
> 
>  Shouldn't it make sure all copies match, or discard all of them, to
>  avoid random corruptions kept in the repository?

Making sure each copy matches is a bigger change than I would be comfortable with in the rc window. If you intend for this to at least be in a better state than before, then the current fix is safer than doing that harder work. If we had a clear repro that was testable, then I might have a different opinion. (I see that Thomas updated the thread with a possible repro, I will get back to him soon.)

As for discarding them all: we would need to add code to "reparse" a commit from the object database. Perhaps that is doable, but we have so far not removed data from a parsed 'struct commit'. This is probably the easiest way forward to guarantee correct data here. Again, let's find a way to test this before committing.

Thanks, -Stolee

Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 4 in “What's cooking in git.git (Oct 2020, #02; Fri, 9)”
  1. Junio C HamanoOct 9, 2020
  2. Derrick StoleeOct 9, 2020
  3. Junio C HamanoOct 9, 2020
  4. Derrick StoleeOct 9, 2020

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.