All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] doc: builtin add -i is enabled by feature.experimental
@ 2021-06-15 16:45 Todd Zullinger
  2021-06-15 19:24 ` Ævar Arnfjörð Bjarmason
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Todd Zullinger @ 2021-06-15 16:45 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Johannes Schindelin

Note that add.interactive.useBuiltin is enabled by feature.experimental.
It was added in 2df2d81ddd (add -i: use the built-in version when
feature.experimental is set, 2020-09-08).

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
I was checking my configuration to see if I still needed to have
add.interactive.useBuiltin set and noticed that it wasn't listed in the
settings enabled by feature.experimental.

Unless it's time to take this out of the experimental phase, it seems worth
documenting -- if for no other reason than to keep fetch.negotiationAlgorithm
from being lonely in the feature.experimental section. ;)

FWIW, I've had this enabled for perhaps a year or so and I don't recall any
instances where it hasn't worked well.  It has come in handy on some systems
where I can't easily install Perl but don't want to give up `add -[ip]`.
Thanks Dscho!

 Documentation/config/add.txt     | 3 ++-
 Documentation/config/feature.txt | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/config/add.txt b/Documentation/config/add.txt
index c9f748f81c..7d6d325571 100644
--- a/Documentation/config/add.txt
+++ b/Documentation/config/add.txt
@@ -9,4 +9,5 @@ add.ignore-errors (deprecated)::
 add.interactive.useBuiltin::
 	[EXPERIMENTAL] Set to `true` to use the experimental built-in
 	implementation of the interactive version of linkgit:git-add[1]
-	instead of the Perl script version. Is `false` by default.
+	instead of the Perl script version.  If `feature.experimental` is
+	enabled, this setting is `true`.  By default, it is `false`.
diff --git a/Documentation/config/feature.txt b/Documentation/config/feature.txt
index cdecd04e5b..caaa97dc61 100644
--- a/Documentation/config/feature.txt
+++ b/Documentation/config/feature.txt
@@ -12,6 +12,10 @@ feature.experimental::
 	setting if you are interested in providing feedback on experimental
 	features. The new default values are:
 +
+* `add.interactive.useBuiltin=true` which enables the built-in implementation
+of the interactive version of linkgit:git-add[1] instead of the Perl script
+version.
++
 * `fetch.negotiationAlgorithm=skipping` may improve fetch negotiation times by
 skipping more commits at a time, reducing the number of round trips.
 
 feature.manyFiles::
 	Enable config options that optimize for repos with many files in the
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] doc: builtin add -i is enabled by feature.experimental
  2021-06-15 16:45 [PATCH] doc: builtin add -i is enabled by feature.experimental Todd Zullinger
@ 2021-06-15 19:24 ` Ævar Arnfjörð Bjarmason
  2021-06-16  2:20 ` Junio C Hamano
  2021-06-17 12:01 ` Johannes Schindelin
  2 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-06-15 19:24 UTC (permalink / raw)
  To: Todd Zullinger; +Cc: git, Junio C Hamano, Johannes Schindelin


On Tue, Jun 15 2021, Todd Zullinger wrote:

> Note that add.interactive.useBuiltin is enabled by feature.experimental.
> It was added in 2df2d81ddd (add -i: use the built-in version when
> feature.experimental is set, 2020-09-08).
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
> I was checking my configuration to see if I still needed to have
> add.interactive.useBuiltin set and noticed that it wasn't listed in the
> settings enabled by feature.experimental.
>
> Unless it's time to take this out of the experimental phase, it seems worth
> documenting -- if for no other reason than to keep fetch.negotiationAlgorithm
> from being lonely in the feature.experimental section. ;)
>
> FWIW, I've had this enabled for perhaps a year or so and I don't recall any
> instances where it hasn't worked well.  It has come in handy on some systems
> where I can't easily install Perl but don't want to give up `add -[ip]`.
> Thanks Dscho!
>
>  Documentation/config/add.txt     | 3 ++-
>  Documentation/config/feature.txt | 6 ++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config/add.txt b/Documentation/config/add.txt
> index c9f748f81c..7d6d325571 100644
> --- a/Documentation/config/add.txt
> +++ b/Documentation/config/add.txt
> @@ -9,4 +9,5 @@ add.ignore-errors (deprecated)::
>  add.interactive.useBuiltin::
>  	[EXPERIMENTAL] Set to `true` to use the experimental built-in
>  	implementation of the interactive version of linkgit:git-add[1]
> -	instead of the Perl script version. Is `false` by default.
> +	instead of the Perl script version.  If `feature.experimental` is
> +	enabled, this setting is `true`.  By default, it is `false`.
> diff --git a/Documentation/config/feature.txt b/Documentation/config/feature.txt
> index cdecd04e5b..caaa97dc61 100644
> --- a/Documentation/config/feature.txt
> +++ b/Documentation/config/feature.txt
> @@ -12,6 +12,10 @@ feature.experimental::
>  	setting if you are interested in providing feedback on experimental
>  	features. The new default values are:
>  +
> +* `add.interactive.useBuiltin=true` which enables the built-in implementation
> +of the interactive version of linkgit:git-add[1] instead of the Perl script
> +version.
> ++
>  * `fetch.negotiationAlgorithm=skipping` may improve fetch negotiation times by
>  skipping more commits at a time, reducing the number of round trips.
>  
>  feature.manyFiles::
>  	Enable config options that optimize for repos with many files in the

Unless there's specific bugs in it that I'm unaware of, I would think
that we'd be better of just removing the setting and switching 100% to
the built-in. See the history of the other *.useBuiltin settings, where
we migrated on a fairly fast schedule.

I also see that use of stash.useBuiltin is still warning for a few
releases now, that could be removed entirely while we're at it. See
9bcde4d5314 (rebase: remove transitory rebase.useBuiltin setting & env,
2021-03-23).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] doc: builtin add -i is enabled by feature.experimental
  2021-06-15 16:45 [PATCH] doc: builtin add -i is enabled by feature.experimental Todd Zullinger
  2021-06-15 19:24 ` Ævar Arnfjörð Bjarmason
@ 2021-06-16  2:20 ` Junio C Hamano
  2021-06-16 17:38   ` Derrick Stolee
  2021-06-17 12:01 ` Johannes Schindelin
  2 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2021-06-16  2:20 UTC (permalink / raw)
  To: Todd Zullinger, Jonathan Tan, Derrick Stolee; +Cc: git, Johannes Schindelin

Todd Zullinger <tmz@pobox.com> writes:

> Note that add.interactive.useBuiltin is enabled by feature.experimental.
> It was added in 2df2d81ddd (add -i: use the built-in version when
> feature.experimental is set, 2020-09-08).
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>

> ---
> I was checking my configuration to see if I still needed to have
> add.interactive.useBuiltin set and noticed that it wasn't listed in the
> settings enabled by feature.experimental.

So together with the fetch.negotiationAlgorithm only two knobs are
affected by feature.experimental?  Or is this patch only about add-i
because that is the only thing you found out about?

Explicitly state that these are the only two that are affected by
this bit in the log message so that readers of "git log" do not have
to ask the question.

The other configuration feature.experimental controls is described
in Documentation/config/fetch.txt like this:

    fetch.negotiationAlgorithm::
            Control how information about the commits in the local repository is
            sent when negotiating the contents of the packfile to be sent by the
            ...
            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). If `feature.experimental` is enabled, then this
            setting defaults to "skipping".
            Unknown values will cause 'git fetch' to error out.

> diff --git a/Documentation/config/add.txt b/Documentation/config/add.txt
> index c9f748f81c..7d6d325571 100644
> --- a/Documentation/config/add.txt
> +++ b/Documentation/config/add.txt
> @@ -9,4 +9,5 @@ add.ignore-errors (deprecated)::
>  add.interactive.useBuiltin::
>  	[EXPERIMENTAL] Set to `true` to use the experimental built-in
>  	implementation of the interactive version of linkgit:git-add[1]
> -	instead of the Perl script version. Is `false` by default.
> +	instead of the Perl script version.  If `feature.experimental` is
> +	enabled, this setting is `true`.  By default, it is `false`.

The added sentence doesn't exactly make sense.  If the experimental
bit is set, this setting _defaults_ to true.  If you set this
explicitly, the experimental bit would not override it, would it?

I prefer to see things described only once, so I am wondering if we
can get away by doing these instead:

 - Start the description of fetch.negotiationAlgorithm with
   [EXPERIMENTAL] like this one does, and remove the sentence about
   the experimental bit from there.

 - Leave the description of add.interactive.useBuiltin as is.

 - Use the change you made to Documentation/config/feature.txt below.

Additionally, it may help readers without hurting maintainability to
say "[EXPERIMENTAL] (see also `feature.experimental`)" to refer them
to the description of the defaults set by the experimental bit.

Alternatively, we can 

 - Remove the description of other configuration variables affected
   by feature.experimental from the description of the experimental
   bit in Documentation/config/feature.txt, and replace it with "The
   default values for configuration variables marked with
   '[EXPERIMENTAL]' are affected by setting this bit", and

 - Start the description of fetch.negotiationAlgorithm with
   [EXPERIMENTAL] like this one does, and remove the sentence about
   the experimental bit from there.

 - Use the change you made to Documentation/config/add.txt as is.

That would also reduce duplicates.  From organizational point of
view, I prefer the latter slightly more.  It makes the readers who
want to learn what knobs would be tweaked to run "grep" on the
documentation set, but it may not be too much to expect from the
more adventuous types.  I dunno.

I am sending this also to Derrick (for adding the experimental bit
and threw negotiate knob into it) and Jonathan Tan (for adding and
describing negotiate) for their input.

Thanks.

> diff --git a/Documentation/config/feature.txt b/Documentation/config/feature.txt
> index cdecd04e5b..caaa97dc61 100644
> --- a/Documentation/config/feature.txt
> +++ b/Documentation/config/feature.txt
> @@ -12,6 +12,10 @@ feature.experimental::
>  	setting if you are interested in providing feedback on experimental
>  	features. The new default values are:
>  +
> +* `add.interactive.useBuiltin=true` which enables the built-in implementation
> +of the interactive version of linkgit:git-add[1] instead of the Perl script
> +version.
> ++
>  * `fetch.negotiationAlgorithm=skipping` may improve fetch negotiation times by
>  skipping more commits at a time, reducing the number of round trips.
>  
>  feature.manyFiles::
>  	Enable config options that optimize for repos with many files in the

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] doc: builtin add -i is enabled by feature.experimental
  2021-06-16  2:20 ` Junio C Hamano
@ 2021-06-16 17:38   ` Derrick Stolee
  0 siblings, 0 replies; 5+ messages in thread
From: Derrick Stolee @ 2021-06-16 17:38 UTC (permalink / raw)
  To: Junio C Hamano, Todd Zullinger, Jonathan Tan
  Cc: git, Johannes Schindelin, Ævar Arnfjörð Bjarmason

On 6/15/2021 10:20 PM, Junio C Hamano wrote:
> Todd Zullinger <tmz@pobox.com> writes:
> 
>> Note that add.interactive.useBuiltin is enabled by feature.experimental.
>> It was added in 2df2d81ddd (add -i: use the built-in version when
>> feature.experimental is set, 2020-09-08).

Thank you for noticing that there is discrepancy in the docs.

> So together with the fetch.negotiationAlgorithm only two knobs are
> affected by feature.experimental?  Or is this patch only about add-i
> because that is the only thing you found out about?
> 
> Explicitly state that these are the only two that are affected by
> this bit in the log message so that readers of "git log" do not have
> to ask the question.
> 
> The other configuration feature.experimental controls is described
> in Documentation/config/fetch.txt like this:
> 
>     fetch.negotiationAlgorithm::
>             Control how information about the commits in the local repository is
>             sent when negotiating the contents of the packfile to be sent by the
>             ...
>             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). If `feature.experimental` is enabled, then this
>             setting defaults to "skipping".
>             Unknown values will cause 'git fetch' to error out.

This was my intention at first: create pointers in both directions:

* The docs for 'feature.experimental' should indicate which options
  are modified when this config is enabled. Users can then navigate to
  those options for ideas of what specifically they mean.

* The options for individual config values (such as
  fetch.negotiationAlgorithm) also mention that their defaults are
  modified by feature.experimental, so users can understand why the
  behavior might have changed.

> Alternatively, we can 
> 
>  - Remove the description of other configuration variables affected
>    by feature.experimental from the description of the experimental
>    bit in Documentation/config/feature.txt, and replace it with "The
>    default values for configuration variables marked with
>    '[EXPERIMENTAL]' are affected by setting this bit", and

This provides a nice way to satisfy the need to know "what changes
when feature.experimental is enabled?" without needing to change the
text with every update.

The issue I have is that it's not as simple as things being enabled
or disabled, because sometimes its a more nuanced change.

>  - Start the description of fetch.negotiationAlgorithm with
>    [EXPERIMENTAL] like this one does, and remove the sentence about
>    the experimental bit from there.

I think we still want to indicate something about feature.experimental
in the affected values. We can establish a clean format for this, such
as stating the option with [EXPERIMENTAL] but then also saying:

	If `feature.experimental` is enabled, then the default changes
	from `default` to `skipping`.

The [EXPERIMENTAL] tag provides an easy way to search, but this
added description can provide context to someone who navigated to
the config without knowing about feature.experimental.

We should explain these possible values separately from this
sentence. Here is a possible modification of the entire description
(format adapted from diff.dirstat):


fetch.negotiationAlgorithm::
	[EXPERIMENTAL] Control how information about the commits in the local
	repository is sent when negotiating the contents of the packfile to be
	sent by the server. The following values are supported:
+
--
`default`;;
	Git will never skips commits, unless the server has acknowledged it or
	one of its descendants.
`skipping`;;
	Git will use an algorithm that skips commits in an effort to converge
	faster,	but may result in a larger-than-necessary packfile.
`noop`;;
	Do not send any information at all, which will almost certainly result
	in a larger-than-necessary packfile, but will skip the negotiation step.
--
+
If `feature.experimental` is enabled, then the default value changes from
`default` to `skipping`. See also the `--negotiation-tip` option for
linkgit:git-fetch[1].


And the docs for `add.interactive.useBuiltin` could be:


add.interactive.useBuiltin::
	[EXPERIMENTAL] Enable this value to use the experimental built-in
	implementation of the interactive version of linkgit:git-add[1]
	instead of the Perl script version. If `feature.experimental` is
	enabled, then the default changes from `false` to `true`.


I'm not pushing hard for this direction, but it is one that makes sense
to me. It allows us to update the individual config values when they are
added or removed from the feature.experimental setting without needing
to also update the feature.experimental setting.

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] doc: builtin add -i is enabled by feature.experimental
  2021-06-15 16:45 [PATCH] doc: builtin add -i is enabled by feature.experimental Todd Zullinger
  2021-06-15 19:24 ` Ævar Arnfjörð Bjarmason
  2021-06-16  2:20 ` Junio C Hamano
@ 2021-06-17 12:01 ` Johannes Schindelin
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2021-06-17 12:01 UTC (permalink / raw)
  To: Todd Zullinger; +Cc: git, Junio C Hamano

Hi Todd,


On Tue, 15 Jun 2021, Todd Zullinger wrote:

> Note that add.interactive.useBuiltin is enabled by feature.experimental.
> It was added in 2df2d81ddd (add -i: use the built-in version when
> feature.experimental is set, 2020-09-08).
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
> I was checking my configuration to see if I still needed to have
> add.interactive.useBuiltin set and noticed that it wasn't listed in the
> settings enabled by feature.experimental.
>
> Unless it's time to take this out of the experimental phase, it seems worth
> documenting -- if for no other reason than to keep fetch.negotiationAlgorithm
> from being lonely in the feature.experimental section. ;)
>
> FWIW, I've had this enabled for perhaps a year or so and I don't recall any
> instances where it hasn't worked well.  It has come in handy on some systems
> where I can't easily install Perl but don't want to give up `add -[ip]`.
> Thanks Dscho!
>
>  Documentation/config/add.txt     | 3 ++-
>  Documentation/config/feature.txt | 6 ++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config/add.txt b/Documentation/config/add.txt
> index c9f748f81c..7d6d325571 100644
> --- a/Documentation/config/add.txt
> +++ b/Documentation/config/add.txt
> @@ -9,4 +9,5 @@ add.ignore-errors (deprecated)::
>  add.interactive.useBuiltin::
>  	[EXPERIMENTAL] Set to `true` to use the experimental built-in
>  	implementation of the interactive version of linkgit:git-add[1]
> -	instead of the Perl script version. Is `false` by default.
> +	instead of the Perl script version.  If `feature.experimental` is

It is usually a good idea to stick to the style unless fixing it. In this
case, I would suggest to remove the extra space after the period.

Other than that, this patch looks fine to me.

Ciao,
Dscho

> +	enabled, this setting is `true`.  By default, it is `false`.
> diff --git a/Documentation/config/feature.txt b/Documentation/config/feature.txt
> index cdecd04e5b..caaa97dc61 100644
> --- a/Documentation/config/feature.txt
> +++ b/Documentation/config/feature.txt
> @@ -12,6 +12,10 @@ feature.experimental::
>  	setting if you are interested in providing feedback on experimental
>  	features. The new default values are:
>  +
> +* `add.interactive.useBuiltin=true` which enables the built-in implementation
> +of the interactive version of linkgit:git-add[1] instead of the Perl script
> +version.
> ++
>  * `fetch.negotiationAlgorithm=skipping` may improve fetch negotiation times by
>  skipping more commits at a time, reducing the number of round trips.
>
>  feature.manyFiles::
>  	Enable config options that optimize for repos with many files in the
> --
> 2.32.0
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-17 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 16:45 [PATCH] doc: builtin add -i is enabled by feature.experimental Todd Zullinger
2021-06-15 19:24 ` Ævar Arnfjörð Bjarmason
2021-06-16  2:20 ` Junio C Hamano
2021-06-16 17:38   ` Derrick Stolee
2021-06-17 12:01 ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.