From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Derrick Stolee" <dstolee@microsoft.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Elijah Newren" <newren@gmail.com>
Subject: Re: [PATCH v3 1/3] repo-settings: fix checking for fetch.negotiationAlgorithm=default
Date: Tue, 01 Feb 2022 10:21:15 -0800 [thread overview]
Message-ID: <xmqq4k5ifnxg.fsf@gitster.g> (raw)
In-Reply-To: <df0ec5ffe98a17e1ec7b572085e733d8748c0379.1643734828.git.gitgitgadget@gmail.com> (Elijah Newren via GitGitGadget's message of "Tue, 01 Feb 2022 17:00:26 +0000")
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> diff --git a/repo-settings.c b/repo-settings.c
> index 00ca5571a1a..38c10f9977b 100644
> --- a/repo-settings.c
> +++ b/repo-settings.c
> @@ -85,6 +85,8 @@ void prepare_repo_settings(struct repository *r)
> r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING;
> else if (!strcasecmp(strval, "noop"))
> r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_NOOP;
> + else if (!strcasecmp(strval, "default"))
> + r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_DEFAULT;
> }
After this step, this function does:
* fetch_negotiation_algorithm set to _DEFAULT
* experimental bit flips it to _SKIPPING
* config is read and skipping/noop/default overwrites it.
which is better than ignoring "default", but it strikes me as
unnatural. If it were done like this instead:
* fetch_negotiation_algorithm is set to _DEFAULT
* config is read and skipping/noop/default overwrites it.
* experimental bit flips it to _SKIPPING only when it is still _DEFAULT
this bug wouldn't have happened, I suspect.
More importantly, those who want to say "I want to keep up with the
'possible future default', which is appropriately chosen by Git for
opt-in experimenters" by setting feature.experimental to true, would
be able to do so when the flow is reordered like so.
Setting fetch.negotiationAlgorithm=default would be the way to do
so.
Let's read on and see later steps of this series achieves the same.
Perhaps they may do the same reordering.
Thanks.
next prev parent reply other threads:[~2022-02-01 18:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 1:56 [PATCH] repo-settings: fix checking for fetch.negotiationAlgorithm=default Elijah Newren via GitGitGadget
2022-01-28 7:25 ` Ævar Arnfjörð Bjarmason
2022-01-29 1:40 ` Elijah Newren
2022-01-29 6:08 ` Ævar Arnfjörð Bjarmason
2022-01-31 16:57 ` Junio C Hamano
2022-01-31 17:33 ` Elijah Newren
2022-01-31 21:03 ` Ævar Arnfjörð Bjarmason
2022-01-31 21:47 ` Elijah Newren
2022-02-01 17:37 ` Jonathan Tan
2022-01-31 22:06 ` Junio C Hamano
2022-01-29 17:51 ` [PATCH v2] " Elijah Newren via GitGitGadget
2022-02-01 17:00 ` [PATCH v3 0/3] " Elijah Newren via GitGitGadget
2022-02-01 17:00 ` [PATCH v3 1/3] " Elijah Newren via GitGitGadget
2022-02-01 18:21 ` Junio C Hamano [this message]
2022-02-01 17:00 ` [PATCH v3 2/3] repo-settings: fix error handling for unknown values Elijah Newren via GitGitGadget
2022-02-01 18:21 ` Junio C Hamano
2022-02-01 17:00 ` [PATCH v3 3/3] repo-settings: name the default fetch.negotiationAlgorithm 'consecutive' Elijah Newren via GitGitGadget
2022-02-01 18:35 ` Junio C Hamano
2022-02-02 3:42 ` [PATCH v4 0/3] repo-settings: fix checking for fetch.negotiationAlgorithm=default Elijah Newren via GitGitGadget
2022-02-02 3:42 ` [PATCH v4 1/3] " Elijah Newren via GitGitGadget
2022-02-02 3:42 ` [PATCH v4 2/3] repo-settings: fix error handling for unknown values Elijah Newren via GitGitGadget
2022-02-02 3:42 ` [PATCH v4 3/3] repo-settings: rename the traditional default fetch.negotiationAlgorithm Elijah Newren via GitGitGadget
2022-02-02 17:50 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4k5ifnxg.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).