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

Re: [PATCH 1/3] commit-graph: let commit graph respect commit graft

From
Derrick Stolee <derrickstolee@github.com>
Date
Sep 1, 2022, 19:18 UTC
Message-ID
<8b9e8c2d-7a64-2d66-83a8-2a7daff9a81c@github.com>
In-Reply-To
<19fd72c34dcd1332df638d76b0b028e9d9da3d41.1662025272.git.gitgitgadget@gmail.com>
On 9/1/2022 5:41 AM, ZheNing Hu via GitGitGadget wrote:
Show 15 quoted lines
> From: ZheNing Hu <adlternative@gmail.com>
> 
> In repo_parse_commit_internal(), if we want to use
> commit graph, it will call parse_commit_in_graph() to
> parse commit's content from commit graph, otherwise
> call repo_read_object_file() to parse commit's content
> from commit object.
> 
> repo_read_object_file() will respect commit graft,
> which can correctly amend commit's parents. But
> parse_commit_in_graph() not. Inconsistencies here may
> result in incorrect processing of shallow clone.
> 
> So let parse_commit_in_graph() respect commit graft as
> repo_read_object_file() does, which can solve this problem.

If grafts or replace-objects exist, then the commit-graph is disabled and this code will never be called. I would expect a test case demonstrating the change in behavior here, but that is impossible.

The commit-graph parsing should not be bogged down with this logic.

Thanks, -Stolee

Previous: ZheNing Hu via GitGitGadgetNext: ZheNing Hu
Message 3 of 12 in “list-object-filter: introduce depth filter”
  1. 0/3 list-object-filter: introduce depth filterZheNing Hu via GitGitGadget, Sep 1, 2022
  2. 1/3 commit-graph: let commit graph respect commit graftZheNing Hu via GitGitGadget, Sep 1, 2022
  3. Derrick StoleeSep 1, 2022
  4. ZheNing HuSep 4, 2022
  5. 2/3 list-object-filter: pass traversal_context in filter_init_fnZheNing Hu via GitGitGadget, Sep 1, 2022
  6. 3/3 list-object-filter: introduce depth filterZheNing Hu via GitGitGadget, Sep 1, 2022
  7. Derrick StoleeSep 1, 2022
  8. Johannes SchindelinSep 2, 2022
  9. ZheNing HuSep 4, 2022
  10. Johannes SchindelinSep 7, 2022
  11. ZheNing HuSep 11, 2022
  12. ZheNing HuSep 4, 2022

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.