Re: [ITCH] Specify refspec without remote
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Mar 19, 2013, 09:58 UTC
- Message-ID
- <CALkWK0=WCsXErHft9RbDOeehon7E2oCj5-YT6Ph+8bLFW-5JaQ@mail.gmail.com>
- In-Reply-To
- <20130318170804.GA15924@sigill.intra.peff.net>
Jeff King wrote:
Show 15 quoted lines
> On Mon, Mar 18, 2013 at 10:28:59PM +0530, Ramkumar Ramachandra wrote: >> Is there a reason for the remote not being optional, or are we just >> waiting for a patch? The only problem I can foresee is very minor: >> there is a ref with the same name as a remote; in this case, we'd have >> to specify both the remote and the ref. > > I think the ambiguity is a little more complex than that, because we > cannot enumerate the universe of all remotes. Keep in mind that we can > take either a configured remote or a URL (or ssh host). So what does: > > git push foo:bar > > mean? Is it pushing "refs/heads/foo" to "refs/heads/bar" on "origin"? Or > is it using the default refspecs to push to the "bar" repo on the host > "foo" over ssh?
Wait, why does git-push support pushing to a URL directly? Shouldn't the user be required to create a new remote out of the URL and push to that? What happens to upstream branches if we directly push to a URL?