Re: [ITCH] Specify refspec without remote
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 10, 2013, 21:23 UTC
- Message-ID
- <20130410212329.GD27070@google.com>
- In-Reply-To
- <20130410201103.GD24177@sigill.intra.peff.net>
Jeff King wrote:
> On Wed, Apr 10, 2013 at 01:05:12PM -0700, Jonathan Nieder wrote:
Show 20 quoted lines
>> git push >> >> and "[push] default = upstream", then it is obvious what the user >> wanted to happen. But what about when "[push] default = matching"? >> Which of the following behaviors is correct? >> >> a) Error: you didn't tell me which remote to push to. >> b) Just behave like "git push my-personal-remote :". >> c) Ignore which branch is the current branch and behave like >> "git push origin :". >> >> How about when "[push] default = current"? >> >> Except that people might have scripts or habits tied to the current >> behavior, any of (a), (b), and (c) sounds fine to me. (b) is the >> obvious choice for historical reasons. > > I think (b) could be quite surprising to a user. I suspect it hasn't > come up because people just don't work with a lot of different remotes > in practice.
Yeah, I think you're right.
I'll try writing a series to switch to (c) for [push] default = matching and (a) for default = simple (and one of the two for default = current. Not sure which yet).
Thanks, Jonathan