Re: [ITCH] Specify refspec without remote

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [ITCH] Specify refspec without remote

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:45

Ramkumar Ramachandra [off-list ref] writes:
Junio C Hamano wrote:
quoted
host:foo/bar (take my "host" branch, push it to their "foo/bar"
branch) could be tricky, no?  It could be trying to go over the ssh
to "host" and access repository at $HOME/foo/bar.  The git_connect()
call may even succeed and you cannot use the failure as a hint to
disambiguate.

Also the request may genuinely be to access foo/bar repository at
the host, but the network layer had trouble connecting temporarily
to the host.  After disambiguating incorrectly to push to the
origin, mapping our host branch to their foo/bar branch, that push
might even succeed.
Oh, ouch.  I didn't think of that.  What do you suggest we do?  Go
with Duy's simple '-' solution, or try some heuristics that may lead
to confusing behavior in edge cases?
What is bad about saying "push origin ...the rest..."?

It is beyond me why people would want to invent unintuitive line
noise like '-' that others need to read the manual from cover to
cover to find and memorize for something small like this.

Re: [ITCH] Specify refspec without remote

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:45

Junio C Hamano wrote:
What is bad about saying "push origin ...the rest..."?
I don't know which remote to push to: all I know is that the remote to
push to is configured somewhere in the web of branch.remote,
remote.pushdefault, and branch.<name>.pushremote, and I don't want to
have to figure that out by hand.  Ever since we got triangular
workflows, I've been missing the implicit beauty when I have to
force-push some refs.

Re: [ITCH] Specify refspec without remote

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:45

Ramkumar Ramachandra wrote:
[...]
Let's not do anything too complex, and just aim for a more pleasant
experience for the simple case of force-pushing some refs without the
:<dst> counterpart.  Then, all we have to do is verify that what is
specified is not a valid remote, and is not a valid local path (to a
git repository, but we don't need to check that), correct?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help