git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Fabien Terrani <terranifabien@gmail.com>,
	git@vger.kernel.org
Subject: Re: remote.<name>.merge missing from the git-config man page?
Date: Fri, 12 Mar 2021 15:45:36 -0800	[thread overview]
Message-ID: <xmqq5z1w542n.fsf@gitster.g> (raw)
In-Reply-To: <87a6rd2tp8.fsf@igel.home> (Andreas Schwab's message of "Mon, 08 Mar 2021 22:58:59 +0100")

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Mär 08 2021, Taylor Blau wrote:
>
>> On Mon, Mar 08, 2021 at 09:57:56PM +0100, Andreas Schwab wrote:
>>> The configured upstream is the value of branch.<name>.merge, isn't it?
>>> That would be the name of a remote, not the name of a branch.
>>
>> Right; the '<name>' in 'branch.<name>.merge' is your local name for a
>> branch, but the value of that configuration is the remote's name.
>
> Sorry, I was misreading branch.<name>.merge as branch.<name>.remote.
> Now it makes all sense to me.

OK, so do we have a version that is good to go?

Thanks.

-- >8 --
From: Taylor Blau <me@ttaylorr.com>
Date: Mon, 8 Mar 2021 13:43:47 -0500
Subject: [PATCH] Documentation/git-push.txt: correct configuration typo

In the EXAMPLES section, git-push(1) says that 'git push origin' pushes
the current branch to the value of the 'remote.origin.merge'
configuration.

This wording (which dates back to b2ed944af7 (push: switch default from
"matching" to "simple", 2013-01-04)) is incorrect. There is no such
configuration as 'remote.<name>.merge'. This likely was originally
intended to read "branch.<name>.merge" instead.

Indeed, when 'push.default' is 'simple' (which is the default value, and
is applicable in this scenario per "without additional configuration"),
setup_push_upstream() dies if the branch's local name does not match
'branch.<name>.merge'.

Correct this long-standing typo to resolve some recent confusion on the
intended behavior of this example.

Reported-by: Adam Sharafeddine <adam.shrfdn@gmail.com>
Reported-by: Fabien Terrani <terranifabien@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

Notes (amlog):
    Message-Id: <YEZwY0721KvQNkK+@nand.local>

 Documentation/git-push.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index ab103c82cf..a953c7c387 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -600,7 +600,7 @@ EXAMPLES
 
 `git push origin`::
 	Without additional configuration, pushes the current branch to
-	the configured upstream (`remote.origin.merge` configuration
+	the configured upstream (`branch.<name>.merge` configuration
 	variable) if it has the same name as the current branch, and
 	errors out without pushing otherwise.
 +
-- 
2.31.0-rc2-171-g89112de4ba


  reply	other threads:[~2021-03-12 23:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 12:10 remote.<name>.merge missing from the git-config man page? Fabien Terrani
2021-03-08 16:57 ` Eric Sunshine
2021-03-08 17:27 ` Junio C Hamano
2021-03-08 18:43   ` Taylor Blau
2021-03-08 20:14     ` Andreas Schwab
2021-03-08 20:28       ` Taylor Blau
2021-03-08 20:41         ` Andreas Schwab
2021-03-08 20:45           ` Taylor Blau
2021-03-08 20:57             ` Andreas Schwab
2021-03-08 21:06               ` Taylor Blau
2021-03-08 21:58                 ` Andreas Schwab
2021-03-12 23:45                   ` Junio C Hamano [this message]
2021-03-13  7:59                     ` Jonathan Nieder
2021-03-08 21:20             ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq5z1w542n.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=schwab@linux-m68k.org \
    --cc=terranifabien@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).