All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Todd Zullinger <tmz@pobox.com>,
	Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] doc: builtin add -i is enabled by feature.experimental
Date: Wed, 16 Jun 2021 13:38:46 -0400	[thread overview]
Message-ID: <545a93c8-3135-6cc5-6b14-1597a2658b9d@gmail.com> (raw)
In-Reply-To: <xmqq4kdyturm.fsf@gitster.g>

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

  reply	other threads:[~2021-06-16 17:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-06-17 12:01 ` Johannes Schindelin

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=545a93c8-3135-6cc5-6b14-1597a2658b9d@gmail.com \
    --to=stolee@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jonathantanmy@google.com \
    --cc=tmz@pobox.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 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.