From: Jack Nagel <jacknagel@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] remote.pushdefault and branch.<name>.pushremote definition order
Date: Mon, 24 Feb 2014 00:10:04 -0500 [thread overview]
Message-ID: <CAMYxyaUwPXXdvGv786_p5n7-biMLOFbur-gQ1pxXOttc0R0=eg@mail.gmail.com> (raw)
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
next reply other threads:[~2014-02-24 5:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 5:10 Jack Nagel [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMYxyaUwPXXdvGv786_p5n7-biMLOFbur-gQ1pxXOttc0R0=eg@mail.gmail.com' \
--to=jacknagel@gmail.com \
--cc=git@vger.kernel.org \
/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.
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).