Thread (33 messages) flat view 33 messages, 4 authors, 2016-06-15

Re: [ITCH] Specify refspec without remote

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:56:46

Jeff King wrote:
On Wed, Apr 10, 2013 at 01:05:12PM -0700, Jonathan Nieder wrote:
quoted
	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help