{"thread":{"id":"28302","subject":"Pushing with --mirror over HTTP?","startedAt":"2011-09-05T04:05:37Z","lastAt":"2011-12-19T17:12:11Z","messageCount":4,"participants":["Eli Barzilay","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"174843","messageId":"20068.19089.303108.950233@winooski.ccs.neu.edu","threadId":"28302","inReplyTo":null,"subject":"Pushing with --mirror over HTTP?","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2011-09-05T04:05:37Z","receivedAt":"2011-09-05T04:05:37Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"Is there anything broken with pushing with mirror over HTTP?  I'm\ntrying that with a github url, and I get a broken-looking error\nmessage:\n\n  remote part of refspec is not a valid name in :.have\n\nand with the google code, I get:\n\n  error: unable to push to unqualified destination: HEAD\n\nPushing to both of these work fine without `--mirror'.\n\n\n(BTW, as a workaround, I'm using\n  push --force --tags <url> :\nis this achieving the same effect for a repo without weird refs?)\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"},{"id":"175042","messageId":"20110907213950.GI13364@sigill.intra.peff.net","threadId":"28302","inReplyTo":"20068.19089.303108.950233@winooski.ccs.neu.edu","subject":"Re: Pushing with --mirror over HTTP?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-09-07T21:39:50Z","receivedAt":"2011-09-07T21:39:50Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:\n\n> Is there anything broken with pushing with mirror over HTTP?  I'm\n> trying that with a github url, and I get a broken-looking error\n> message:\n> \n>   remote part of refspec is not a valid name in :.have\n\nIt's probably nothing to do with http, but rather with alternate object\ndatabases on the server (which GitHub uses heavily). The server hands\nout fake \".have\" refs telling you it has some other branch tips to base\npacks off of. So I suspect the \"push --mirror\" code is simply wrong for\ntrying to update those refs (it may be exacerbated by using http,\nthough, as the remote helper code seems to have some extra checks).\n\n> and with the google code, I get:\n> \n>   error: unable to push to unqualified destination: HEAD\n> \n> Pushing to both of these work fine without `--mirror'.\n\nThis one, I'm not sure. It may be related.\n\n> (BTW, as a workaround, I'm using\n>   push --force --tags <url> :\n> is this achieving the same effect for a repo without weird refs?)\n\nNot quite. I think:\n\n  git push --force <url> refs/*:refs/*\n\nwould be closer. But even that's not quite right.  I believe that\n\"--mirror\" will also delete any remote refs that don't exist locally\n(which is why you are seeing the \":.have\" refspec above, which attempts\nto delete it).\n\n-Peff\n"},{"id":"175060","messageId":"20072.12104.965815.994761@winooski.ccs.neu.edu","threadId":"28302","inReplyTo":"20110907213950.GI13364@sigill.intra.peff.net","subject":"Re: Pushing with --mirror over HTTP?","fromName":"Eli Barzilay","fromEmail":"eli@barzilay.org","sentAt":"2011-09-08T02:58:16Z","receivedAt":"2011-09-08T02:58:16Z","isPatch":false,"sender":{"key":"eli@barzilay.org","avatar":"https://avatars.githubusercontent.com/u/185905?v=4"},"body":"5 hours ago, Jeff King wrote:\n> On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:\n> \n> > Is there anything broken with pushing with mirror over HTTP?  I'm\n> > trying that with a github url, and I get a broken-looking error\n> > message:\n> > \n> >   remote part of refspec is not a valid name in :.have\n> \n> It's probably nothing to do with http, but rather with alternate\n> object databases on the server (which GitHub uses heavily). The\n> server hands out fake \".have\" refs telling you it has some other\n> branch tips to base packs off of. So I suspect the \"push --mirror\"\n> code is simply wrong for trying to update those refs (it may be\n> exacerbated by using http, though, as the remote helper code seems\n> to have some extra checks).\n\nAh -- I thought that this was some result of parsing some text message\nor something like that, maybe if the error was\n\n  remote part of refspec is not a valid name in \":.have\"\n\nor even\n\n  remote part of refspec is not a valid name in: :.have\n\nit would have been clearer?  Seems like it's a good place for this\nsince some `:foo' is likely to appear there, and the colon can be\nconfused as part of the text.\n\nAlso, maybe the man page should say something about `--mirror' not\nworking well with such servers?  It looks to me like mirroring to\ngithub and to google code would be pretty popular.\n\n\n> > and with the google code, I get:\n> > \n> >   error: unable to push to unqualified destination: HEAD\n> > \n> > Pushing to both of these work fine without `--mirror'.\n> \n> This one, I'm not sure. It may be related.\n> \n> > (BTW, as a workaround, I'm using\n> >   push --force --tags <url> :\n> > is this achieving the same effect for a repo without weird refs?)\n> \n> Not quite. I think:\n> \n>   git push --force <url> refs/*:refs/*\n> \n> would be closer.\n\nThanks -- I'll use that instead.\n\n\n> But even that's not quite right.  I believe that \"--mirror\" will\n> also delete any remote refs that don't exist locally (which is why\n> you are seeing the \":.have\" refspec above, which attempts to delete\n> it).\n\nIs there some way of doing that?  (We do use a branch during releases\nthat is deleted after the release, so I need to propagate these\ndeletions.)\n\n-- \n          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:\n                    http://barzilay.org/                   Maze is Life!\n"},{"id":"181476","messageId":"20111219171211.GA20844@sigill.intra.peff.net","threadId":"28302","inReplyTo":"20072.12104.965815.994761@winooski.ccs.neu.edu","subject":"Re: Pushing with --mirror over HTTP?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-12-19T17:12:11Z","receivedAt":"2011-12-19T17:12:11Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 07, 2011 at 10:58:16PM -0400, Eli Barzilay wrote:\n\n> 5 hours ago, Jeff King wrote:\n> > On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:\n> > \n> > > Is there anything broken with pushing with mirror over HTTP?  I'm\n> > > trying that with a github url, and I get a broken-looking error\n> > > message:\n> > > \n> > >   remote part of refspec is not a valid name in :.have\n> > \n> > It's probably nothing to do with http, but rather with alternate\n> > object databases on the server (which GitHub uses heavily). The\n> > server hands out fake \".have\" refs telling you it has some other\n> > branch tips to base packs off of. So I suspect the \"push --mirror\"\n> > code is simply wrong for trying to update those refs (it may be\n> > exacerbated by using http, though, as the remote helper code seems\n> > to have some extra checks).\n\nSorry for the very delayed response on your bug, but at least I have\ngood news. :)\n\nIt should be fixed by:\n\n  http://article.gmane.org/gmane.comp.version-control.git/187373\n\n(I was trying to fix another bug there, but see my followup for a\ndiscussion of .have).\n\n-Peff\n"}]}