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

Re: [PATCH 1/1] commit-graph: writing missing parents is a BUG

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 2, 2019, 23:01 UTC
Message-ID
<xmqqwonmiryw.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<907a24d2c45acec17607971b577782798c4adcbc.1545250444.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 20 quoted lines
> From: Derrick Stolee <dstolee@microsoft.com>
>
> When writing a commit-graph, we write GRAPH_MISSING_PARENT if the
> parent's object id does not appear in the list of commits to be
> written into the commit-graph. This was done as the initial design
> allowed commits to have missing parents, but the final version
> requires the commit-graph to be closed under reachability. Thus,
> this GRAPH_MISSING_PARENT value should never be written.
>
> However, there are reasons why it could be written! These range
> from a bug in the reachable-closure code to a memory error causing
> the binary search into the list of object ids to fail. In either
> case, we should fail fast and avoid writing the commit-graph file
> with bad data.
>
> Remove the GRAPH_MISSING_PARENT constant in favor of the constant
> GRAPH_EDGE_LAST_MASK, which has the same value.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
Thanks, will queue.
Previous: Derrick Stolee via GitGitGadget
Message 3 of 3 in “commit-graph: writing missing parents is a BUG”
  1. 0/1 commit-graph: writing missing parents is a BUGDerrick Stolee via GitGitGadget, Dec 19, 2018
  2. 1/1 commit-graph: writing missing parents is a BUGDerrick Stolee via GitGitGadget, Dec 19, 2018
  3. Junio C HamanoJan 2, 2019

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.