From: Junio C Hamano <gitster@pobox.com>
To: Tao Klerks <tao@klerks.biz>
Cc: "Josh Steadmon" <steadmon@google.com>,
"Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH v4] merge: new autosetupmerge option 'simple' for matching branches
Date: Wed, 20 Apr 2022 18:53:24 -0700 [thread overview]
Message-ID: <xmqqlevzkxrf.fsf@gitster.g> (raw)
In-Reply-To: CAPMMpohQei9vBBm=7hC=N5LPwzMCED=fZcXyePnrkLCHfCJTZw@mail.gmail.com
Tao Klerks <tao@klerks.biz> writes:
> If they branched from a different-name remote branch (they created an
> new / independent local branch), then no remote tracking relationship
> will have been set up, and instead of the "fatal: The upstream branch
> of your current branch does not match
> the name of your current branch" error and advice, they will get a
> much simpler error and advice:
>
> ---
> fatal: The current branch whatevs has no upstream branch.
> To push the current branch and set the remote as upstream, use
>
> git push --set-upstream origin whatevs
> ---
>
> When they follow those instructions, they will be in the "simple"
> setup same as if they had just branched from same-name.
Which means that they need to see an error once, offered to either
set push.default or branch.autosetupmerge (it is not "and/or", but
"or", because you want to tell them to set "instead of push.default,
set branch.autosetupmerge"), and if they follow the latter, they have
to then hit a different error and be told to do the "set-upstream"
individually. I am wondering if that is more irritating than it is
worth. Instead, if you tell them to use branch.autosetupmerge=simple
and use push.default to something better than simple, wouldn't that
cover more cases and give fewer roadblocks to the end-user with
unnecessary errors?
>> Setting the latter to 'simple'
>> means there are *MORE* branches that do not have .remote/.merge set
>> up, doesn't it? Which in turn means that we are relying more on
>> what push.default is set to, right?
>
> No
Why no? if setupauto is yes, then any new branch forked from a
remote-tracking branch will get .remote/.merge set up, and with these
specific configuration they can "push" back to the configured place.
If it is set to simple, only new branches forked from a remote-tracking
branch that happens to have the same name will get it, and others do
not get .remote/.merge set up. Which means user's "git push" will then
consult push.default settings, and setting it right becomes more
important, no?
next prev parent reply other threads:[~2022-04-21 1:53 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
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 [this message]
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=xmqqlevzkxrf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=steadmon@google.com \
--cc=sunshine@sunshineco.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 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.