Re: [PATCH] doc: builtin add -i is enabled by feature.experimental

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/15/2021 10:20 PM, Junio C Hamano wrote:
> Todd Zullinger <tmz@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux