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

2 messages, 2 authors, 2021-03-08 · open the first message on its own page

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

From: Fabien Terrani <hidden>
Date: 2021-03-08 12:11:39

Hi all,

I was recently trying to understand the git-push command's behavior,
especially regarding the configuration values's resolution. I read the
following in the EXAMPLES section of the git-push man page:
git push origin
    Without additional configuration, pushes the current branch to the configured upstream (remote.origin.merge configuration variable) if it has the same name as the current branch, and errors out without pushing otherwise.
I then had a look at the git-config man page and I was surprised to
notice that there was no documentation at all about a
remote.<name>.merge or remote.origin.merge configuration value. I am
definitely not a git expert but this looks strange to me. Am I missing
something? Is remote.<name>.merge used by git at all?

(before mailing here, I tried carefully examining git's source code to
see if there was a remote.<name>.merge value used somewhere. I can't
be 100% positive since this was very complex to me, but I personally
couldn't find anything referencing remote.<name>.merge, while I found
code using other values like remote.<name>.push, push.default etc.)


Best regards

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

From: Eric Sunshine <hidden>
Date: 2021-03-08 16:58:30

[cc:+adam +phillipe]

On Mon, Mar 8, 2021 at 7:11 AM Fabien Terrani [off-list ref] wrote:
I was recently trying to understand the git-push command's behavior,
especially regarding the configuration values's resolution. I read the
following in the EXAMPLES section of the git-push man page:
quoted
git push origin
    Without additional configuration, pushes the current branch to the configured upstream (remote.origin.merge configuration variable) if it has the same name as the current branch, and errors out without pushing otherwise.
I then had a look at the git-config man page and I was surprised to
notice that there was no documentation at all about a
remote.<name>.merge or remote.origin.merge configuration value. I am
definitely not a git expert but this looks strange to me. Am I missing
something? Is remote.<name>.merge used by git at all?
Yours is the second report[1] about this in a few weeks.
(before mailing here, I tried carefully examining git's source code to
see if there was a remote.<name>.merge value used somewhere. I can't
be 100% positive since this was very complex to me, but I personally
couldn't find anything referencing remote.<name>.merge, while I found
code using other values like remote.<name>.push, push.default etc.)
I spent a bit of time going through the source code, as well, trying
to determine the correct name of this variable but didn't arrive at an
answer before having to turn to other tasks.

Hopefully, someone more familiar with this area of the project can
chime in with the correct answer and more useful response.

[1]: https://lore.kernel.org/git/CAAxrY9yjTKV8-K0AmO4fBmtDrSB4KkN_xKOMmtSb-dvixJNaEQ@mail.gmail.com/T/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help