]> git.99rst.org Git - git.git/commitdiff
Documentation/git-push.txt: correct configuration typo
authorTaylor Blau <redacted>
Mon, 8 Mar 2021 18:43:47 +0000 (13:43 -0500)
committerJunio C Hamano <redacted>
Sat, 13 Mar 2021 23:41:45 +0000 (15:41 -0800)
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 <redacted>
Reported-by: Fabien Terrani <redacted>
Signed-off-by: Taylor Blau <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/git-push.txt

index ab103c82cfdc38c37e7aa0e07c324ca31681ae22..a953c7c38790a8545489ae621113ebe62d9d0fe2 100644 (file)
@@ -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.
 +
git clone https://git.99rst.org/PROJECT