git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] repo-settings: fix checking for fetch.negotiationAlgorithm=default
Date: Sat, 29 Jan 2022 07:08:44 +0100	[thread overview]
Message-ID: <220129.86y22zaw3p.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CABPp-BEehHHbDi_muWHCaT1GvRmPbPiMmvB-2O9+0w2A+yEM0Q@mail.gmail.com>


On Fri, Jan 28 2022, Elijah Newren wrote:

> Hi Ævar,
>
> On Thu, Jan 27, 2022 at 11:54 PM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
> [...]
>>> > Technically, before commit 3050b6dfc75d, repo-settings would treat any
>> > fetch.negotiationAlgorithm value other than "skipping" or "noop" as a
>> > request for "default", but I think it probably makes more sense to
>> > ignore such broken requests and leave fetch.negotiationAlgorithm with
>> > the default value rather than the value of "default".  (If that sounds
>> > confusing, note that "default" is usually the default value, but when
>> > feature.experimental=true, "skipping" is the default value.)
>> >
>> > [...]
>> >     A long sidenote about naming things "default":
>> >
>> >     Many years ago, in the Gnome community, there was a huge fight that
>> >     erupted, in part due to confusion over "default". There was a journalist
>> >     who had been a designer in a past life, who had a little friction with
>> >     the rest of the community, but intended well and generally improved
>> >     things. At some point, they suggested some changes to improve the
>> >     "default" theme (and they were a nice improvement), but not being a
>> >     developer the changes weren't communicated in the form of a patch. And
>> >     the changes accidentally got applied to the wrong theme: the default one
>> >     (yes, there was a theme named "default" which was not the default
>> >     theme). Now, basically no one used the default theme because it was so
>> >     hideously ugly. I think we suffered from a case of not being able to
>> >     change the default (again?) because no one could get an agreement on
>> >     what the default should be. Who did actually use the default theme,
>> >     though? The person writing the release notes (though they only used it
>> >     for taking screenshots to include in the release notes, and otherwise
>> >     used some other theme). So, with people under pressure for an imminent
>> >     release, there were screenshots that looked like garbage, and
>> >     investigation eventually uncovered that it was due to changes that were
>> >     meant for the "default" theme having accidentally been applied to the
>> >     default theme. It could have just been an amusing story if not for the
>> >     other unfortunate factors happening around the same time and the heated
>> >     and protracted flamewars that erupted.
>> >
>> >     Don't name settings/themes/things "default" if it describes something
>> >     specific, since someone may come along and decide that something else
>> >     should be the default, and then you're stuck with a non-default
>> >     "default". Sadly, the name was already picked and documented so for
>> >     backward compatibility we need to support it...
>>
>> Funny story, I think this is only going to bite us if we don't switch
>> the default over along with promoting this out of feature.experimental.
>>
>> I.e. =default should always be equivalent to not declaring that config
>> at all anywhere, and not drift to being a reference to some name that
>> happens to be "default", as in the GNOME case.
>
> No, we have the same problem as the Gnome case.  See this part of the
> documentation for fetch.negotiationAlgorithm:
>
> """
>     The default is "default" which instructs Git to use the
>     default algorithm that never skips commits (unless the server has
>     acknowledged it or one of its descendants).
> """
>
> features.experimental turns on "skipping" as the default behavior, and
> that text clearly rules out the possibility that "default" could be
> used to mean "skipping".  So, if that experimental feature graduates,
> then the default behavior of fetch.negotiationAlgorithm will NOT be
> the "default" behavior of fetch.negotationAlgorithm.

I see what you mean, and I'm aware that I'm debating this with a native
speaker :)

FWIW I didn't read it that way, earlier it discusses "skipping", and
here it's describing what the default is. But especially since you'd
have no reason to set this except to "reset to default" I didn't take it
to be a promise that the default wouldn't change.

I.e. maybe we'll just make it "skipping" and drop the current "default"
code, or we'll give the current "default" a name at that point.

But I do see how us not having a name for the "defult" complicates that
view of the world. For grep.patternType we've got the same thing, but
"default" there is "basic", so that's a bit different.

I do read log.date's "default" as being the sort of GNOME case you're
describing however. But I don't think we'd ever change the default
there, a date format is too subjective, whereas an internal algorithm is
liable to change.

But I think we should just change this to make it explicit (separate
from this narrow bugfix). Maybe "exhaustive" would be a good permanent
name for the default algorithm?

>> In our case it's more of a story about the inconsistencies in our config
>> space, i.e. some values you can't reset at all, some take empty values
>> to do so, others "default" etc.
>> [...]
>>
>> Since it's the same as the preceding test, maybe we can squash this in
>> to avoid the duplication? This works for me.
>> [...]
>> -       rm -f trace &&
>> -       cp -r client clientv2 &&
>> -       GIT_TRACE_PACKET="$(pwd)/trace" git -C clientv2 -c protocol.version=2 \
>> +test_expect_success 'use ref advertisement to prune "have" lines sent' '
>> +       test_negotiation_algorithm_default \
>>                 -c feature.experimental=true \
>> -               -c fetch.negotiationAlgorithm=default \
>> -               fetch origin server_has both_have_2 &&
>> -       grep "have $(git -C client rev-parse client_has)" trace &&
>> -       grep "have $(git -C client rev-parse both_have_2)" trace &&
>> -       ! grep "have $(git -C client rev-parse both_have_2^)" trace
>> +               -c fetch.negotiationAlgorithm=default
>
> I think you accidentally dropped one of the two tests by turning it
> into a function and then only calling it for the latter usage and not
> the former, but I get your idea.  It makes sense; I'll make the
> change.

Ah yes, oops. Yes we should clearly have the non-"-c [...]" case too
(and it's what I was aiming for) :)

  reply	other threads:[~2022-01-29  6:34 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 [this message]
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
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220129.86y22zaw3p.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).