git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Tao Klerks <tao@klerks.biz>
Subject: Re: [PATCH 3/3] branch documentation: new autosetupmerge option "simple"
Date: Thu, 24 Feb 2022 11:38:36 -0800	[thread overview]
Message-ID: <xmqq1qzsm4w3.fsf@gitster.g> (raw)
In-Reply-To: <39c14906e7b65843c2543682bb577c6a2253240a.1645695940.git.gitgitgadget@gmail.com> (Tao Klerks via GitGitGadget's message of "Thu, 24 Feb 2022 09:45:40 +0000")

"Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Tao Klerks <tao@klerks.biz>
>
> Updating the branch and config documentation to reflect
> the new "simple" option to branch.autosetupmerge.

Documentation/Submittingpatches[[describe-changes]].

But it would be moot; these changes are better done as part of [1/3]
and in that case, updating the documentation (or testing the desired
behaviour, for that matter) is not something we need to justify
separately.  It is something we must done as part of the change.

> diff --git a/Documentation/config/branch.txt b/Documentation/config/branch.txt
> index 1e0c7af014b..7b4e5ca5b74 100644
> --- a/Documentation/config/branch.txt
> +++ b/Documentation/config/branch.txt
> @@ -9,7 +9,9 @@ branch.autoSetupMerge::
>  	automatic setup is done when the starting point is either a
>  	local branch or remote-tracking branch; `inherit` -- if the starting point
>  	has a tracking configuration, it is copied to the new
> -	branch. This option defaults to true.
> +	branch; `simple` -- automatic setup is done when the starting point is

It may be clearer to say "done only when".  I dunno.

> +	a remote-tracking branch and the new branch has the same name as the
> +	remote branch. This option defaults to true.

> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
> index c8b4f9ce3c7..f99d6a6b008 100644
> --- a/Documentation/git-branch.txt
> +++ b/Documentation/git-branch.txt
> @@ -227,7 +227,9 @@ want `git switch`, `git checkout` and `git branch` to always behave as if `--no-
>  were given. Set it to `always` if you want this behavior when the
>  start-point is either a local or remote-tracking branch. Set it to
>  `inherit` if you want to copy the tracking configuration from the
> -branch point.
> +branch point. Set it to `simple` if you want this behavior only when
> +the start-point is a remote branch and the new branch has the same name
> +as the remote branch.

The existing "if you want this behaviour when" is already awkward.
What it means is that only those who want to use the "start-point"
itself as the upstream whether the start-point is local or
remote-tracking,can use "always" and does not get hurt.

But using the phrase for "simple" makes it even worse, as the
condition that the tracking behaviour kicks in is even narrower.  If
you know that start-point is not a remote-tracking branch (by the
way, do not say "remote branch" when you mean "remote-tracking
brnach"), or its name is not the same as the local branch, you just
do not pass --track=simple from the command line.  Strike everything
after "Set it to `simple`" and replace with something like

    `--track=simple` sets up the upstream information only when the
    start-point is a remote-tracking branch and ...

perhaps?

Thanks.

  reply	other threads:[~2022-02-24 19:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  9:45 [PATCH 0/3] adding new branch.autosetupmerge option "simple" Tao Klerks via GitGitGadget
2022-02-24  9:45 ` [PATCH 1/3] merge: new autosetupmerge option 'simple' for matching branches Tao Klerks via GitGitGadget
2022-02-24 19:20   ` Junio C Hamano
2022-02-24  9:45 ` [PATCH 2/3] t3200: tests for new branch.autosetupmerge option "simple" Tao Klerks via GitGitGadget
2022-02-24  9:45 ` [PATCH 3/3] branch documentation: new autosetupmerge " Tao Klerks via GitGitGadget
2022-02-24 19:38   ` Junio C Hamano [this message]
2022-02-25 18:52 ` [PATCH v2 0/2] adding new branch.autosetupmerge " Tao Klerks via GitGitGadget
2022-02-25 18:52   ` [PATCH v2 1/2] merge: new autosetupmerge option 'simple' for matching branches Tao Klerks via GitGitGadget
2022-02-25 20:15     ` Junio C Hamano
2022-02-27 23:59       ` Tao Klerks
2022-02-25 18:52   ` [PATCH v2 2/2] t3200: tests for new branch.autosetupmerge option "simple" Tao Klerks via GitGitGadget
2022-02-28  7:14   ` [PATCH v3 0/2] adding " Tao Klerks via GitGitGadget
2022-02-28  7:14     ` [PATCH v3 1/2] merge: new autosetupmerge option 'simple' for matching branches Tao Klerks via GitGitGadget
2022-02-28 10:39       ` Ævar Arnfjörð Bjarmason
2022-03-02  9:35         ` Tao Klerks
2022-03-20 17:00           ` Tao Klerks
2022-02-28  7:14     ` [PATCH v3 2/2] t3200: tests for new branch.autosetupmerge option "simple" Tao Klerks via GitGitGadget
2022-02-28  9:34       ` Ævar Arnfjörð Bjarmason
2022-03-01  2:58         ` Eric Sunshine
2022-03-01  9:59           ` Tao Klerks
2022-03-01  9:59         ` Tao Klerks
2022-03-21  6:17     ` [PATCH v4] merge: new autosetupmerge option 'simple' for matching branches Tao Klerks via GitGitGadget
2022-04-18 18:15       ` Josh Steadmon
2022-04-20  5:12         ` Tao Klerks
2022-04-20 17:19           ` Josh Steadmon
2022-04-20 17:43           ` Junio C Hamano
2022-04-20 21:31             ` Tao Klerks
2022-04-21  1:53               ` Junio C Hamano
2022-04-21 10:04                 ` Tao Klerks
2022-04-22  2:27                   ` Junio C Hamano
2022-04-22  9:24                     ` Tao Klerks
2022-04-22 13:27                       ` Tao Klerks
2022-04-23  4:44                       ` Junio C Hamano
2022-04-24 11:57                         ` Tao Klerks
2022-04-29  7:31                           ` Tao Klerks
2022-04-29  9:56       ` [PATCH v5 0/3] New options to support "simple" centralized workflow Tao Klerks via GitGitGadget
2022-04-29  9:56         ` [PATCH v5 1/3] branch: new autosetupmerge option 'simple' for matching branches Tao Klerks via GitGitGadget
2022-04-29  9:56         ` [PATCH v5 2/3] push: default to single remote even when not named origin Tao Klerks via GitGitGadget
2022-04-29  9:56         ` [PATCH v5 3/3] push: new config option "push.autoSetupRemote" supports "simple" push Tao Klerks via GitGitGadget
2022-04-29 18:50         ` [PATCH v5 0/3] New options to support "simple" centralized workflow Junio C Hamano
2022-04-30 15:48           ` Tao Klerks

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=xmqq1qzsm4w3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=tao@klerks.biz \
    /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).