git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] remote.pushdefault and branch.<name>.pushremote definition order
@ 2014-02-24  5:10 Jack Nagel
  2014-02-24  8:59 ` [PATCH] remote: handle pushremote config in any order order Jeff King
  0 siblings, 1 reply; 7+ messages in thread
From: Jack Nagel @ 2014-02-24  5:10 UTC (permalink / raw)
  To: git

There seems to be a difference in the behavior of "git push" depending
on whether remote.pushdefault is defined before or after
branch.<name>.pushremote in .git/config.

If remote.pushdefault is defined to be "origin", and later in the
file, branch.master.pushremote is defined to be "upstream", then a
plain "git push" from master errors out because I haven't provided a
refspec or configured push.default. This makes sense.

However, if the order of the two in the file is reversed, then a plain
"git push" pushes to the "origin" repository, even though I have set
the pushremote for master to "upstream". This appears to be a bug.

I would expect the order that things are defined in the config file to
have no effect on the behavior of "git push".

I have reproduced this using git 1.9.0 and 1.8.3.4.

Thanks,
Jack

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-24 22:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24  5:10 [BUG] remote.pushdefault and branch.<name>.pushremote definition order Jack Nagel
2014-02-24  8:59 ` [PATCH] remote: handle pushremote config in any order order Jeff King
2014-02-24 17:55   ` Junio C Hamano
2014-02-24 20:32     ` Junio C Hamano
2014-02-24 20:39       ` Jeff King
2014-02-24 20:53         ` Junio C Hamano
2014-02-24 22:45   ` Ramkumar Ramachandra

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 NNTP newsgroup(s).