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