git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: remote.<name>.merge missing from the git-config man page?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2021, 23:45 UTC
Message-ID
<xmqq5z1w542n.fsf@gitster.g>
In-Reply-To
<87a6rd2tp8.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
Show 11 quoted lines
> 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
Previous: Andreas SchwabNext: Jonathan Nieder
Message 12 of 14 in “remote.<name>.merge missing from the git-config man page?”
  1. Fabien TerraniMar 8, 2021
  2. Eric SunshineMar 8, 2021
  3. Junio C HamanoMar 8, 2021
  4. Taylor BlauMar 8, 2021
  5. Andreas SchwabMar 8, 2021
  6. Taylor BlauMar 8, 2021
  7. Andreas SchwabMar 8, 2021
  8. Taylor BlauMar 8, 2021
  9. Andreas SchwabMar 8, 2021
  10. Taylor BlauMar 8, 2021
  11. Andreas SchwabMar 8, 2021
  12. Junio C HamanoMar 12, 2021
  13. Jonathan NiederMar 13, 2021
  14. Junio C HamanoMar 8, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.