Ramkumar Ramachandra <artag...@gmail.com> writes:

> Jeff King wrote:
>> So you would need some heuristics based on whether something was a valid
>> refspec, or could be a valid remote name or URL.
> All refspecs conform to a very simple format:
>     quux
>     +quux
>     quux:baz
>     +quux:baz
> All of them fail at git_connect().  The third and fourth are
> equivalent and take a little longer to fail than the first two,
> because ssh tries to resolve the hostname "quux" or "+quux".

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

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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to