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

Re: [PATCH 1/1] fetch: set size_multiple in split_commit_graph_opts

From
Derrick Stolee <stolee@gmail.com>
Date
Jan 3, 2020, 13:07 UTC
Message-ID
<a6a6547b-495d-9929-daff-9c0069428703@gmail.com>
In-Reply-To
<xmqq7e29edfd.fsf@gitster-ct.c.googlers.com>
On 1/2/2020 4:49 PM, Junio C Hamano wrote:
Show 17 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> This problem is due to two failures:
>>
>>  1. It is unclear that we can add the flag COMMIT_GRAPH_WRITE_SPLIT
>>     with a NULL split_opts.
>>  2. If we have a non-NULL split_opts, then we override the default
>>     values even if a zero value is given.
>>
>> Correct both of these issues. First, do not override size_mult when
>> the options provide a zero value. Second, stop creating a split_opts
>> in the fetch builtin.
> 
> OK, so there is the hardcoded default 2 in the code, and split_opts
> structure *can* override it, but 0 in the field of the structure is
> meant to signal "no, I do not have any value to override the
> default", not "I do want to set the multiple to 0"?

Correct. The multiple 0 makes it so we never merge layers of the chain, and this was happening accidentally. A caller could still accomplish this by passing -1, but that is not recommended.

-Stolee
Previous: Junio C HamanoNext: Jeff King
Message 5 of 6 in “[PERF BUG] Fix size_mult option in fetch.writeCommitGraph”
  1. 0/1 [PERF BUG] Fix size_mult option in fetch.writeCommitGraphDerrick Stolee via GitGitGadget, Jan 2, 2020
  2. 1/1 fetch: set size_multiple in split_commit_graph_optsDerrick Stolee via GitGitGadget, Jan 2, 2020
  3. Derrick StoleeJan 2, 2020
  4. Junio C HamanoJan 2, 2020
  5. Derrick StoleeJan 3, 2020
  6. Jeff KingJan 6, 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.