All of lore.kernel.org
 help / color / mirror / Atom feed
* Pushing with --mirror over HTTP?
@ 2011-09-05  4:05 Eli Barzilay
  2011-09-07 21:39 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Barzilay @ 2011-09-05  4:05 UTC (permalink / raw)
  To: git

Is there anything broken with pushing with mirror over HTTP?  I'm
trying that with a github url, and I get a broken-looking error
message:

  remote part of refspec is not a valid name in :.have

and with the google code, I get:

  error: unable to push to unqualified destination: HEAD

Pushing to both of these work fine without `--mirror'.


(BTW, as a workaround, I'm using
  push --force --tags <url> :
is this achieving the same effect for a repo without weird refs?)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing with --mirror over HTTP?
  2011-09-05  4:05 Pushing with --mirror over HTTP? Eli Barzilay
@ 2011-09-07 21:39 ` Jeff King
  2011-09-08  2:58   ` Eli Barzilay
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2011-09-07 21:39 UTC (permalink / raw)
  To: Eli Barzilay; +Cc: git

On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:

> Is there anything broken with pushing with mirror over HTTP?  I'm
> trying that with a github url, and I get a broken-looking error
> message:
> 
>   remote part of refspec is not a valid name in :.have

It's probably nothing to do with http, but rather with alternate object
databases on the server (which GitHub uses heavily). The server hands
out fake ".have" refs telling you it has some other branch tips to base
packs off of. So I suspect the "push --mirror" code is simply wrong for
trying to update those refs (it may be exacerbated by using http,
though, as the remote helper code seems to have some extra checks).

> and with the google code, I get:
> 
>   error: unable to push to unqualified destination: HEAD
> 
> Pushing to both of these work fine without `--mirror'.

This one, I'm not sure. It may be related.

> (BTW, as a workaround, I'm using
>   push --force --tags <url> :
> is this achieving the same effect for a repo without weird refs?)

Not quite. I think:

  git push --force <url> refs/*:refs/*

would be closer. But even that's not quite right.  I believe that
"--mirror" will also delete any remote refs that don't exist locally
(which is why you are seeing the ":.have" refspec above, which attempts
to delete it).

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing with --mirror over HTTP?
  2011-09-07 21:39 ` Jeff King
@ 2011-09-08  2:58   ` Eli Barzilay
  2011-12-19 17:12     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Barzilay @ 2011-09-08  2:58 UTC (permalink / raw)
  To: Jeff King; +Cc: git

5 hours ago, Jeff King wrote:
> On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:
> 
> > Is there anything broken with pushing with mirror over HTTP?  I'm
> > trying that with a github url, and I get a broken-looking error
> > message:
> > 
> >   remote part of refspec is not a valid name in :.have
> 
> It's probably nothing to do with http, but rather with alternate
> object databases on the server (which GitHub uses heavily). The
> server hands out fake ".have" refs telling you it has some other
> branch tips to base packs off of. So I suspect the "push --mirror"
> code is simply wrong for trying to update those refs (it may be
> exacerbated by using http, though, as the remote helper code seems
> to have some extra checks).

Ah -- I thought that this was some result of parsing some text message
or something like that, maybe if the error was

  remote part of refspec is not a valid name in ":.have"

or even

  remote part of refspec is not a valid name in: :.have

it would have been clearer?  Seems like it's a good place for this
since some `:foo' is likely to appear there, and the colon can be
confused as part of the text.

Also, maybe the man page should say something about `--mirror' not
working well with such servers?  It looks to me like mirroring to
github and to google code would be pretty popular.


> > and with the google code, I get:
> > 
> >   error: unable to push to unqualified destination: HEAD
> > 
> > Pushing to both of these work fine without `--mirror'.
> 
> This one, I'm not sure. It may be related.
> 
> > (BTW, as a workaround, I'm using
> >   push --force --tags <url> :
> > is this achieving the same effect for a repo without weird refs?)
> 
> Not quite. I think:
> 
>   git push --force <url> refs/*:refs/*
> 
> would be closer.

Thanks -- I'll use that instead.


> But even that's not quite right.  I believe that "--mirror" will
> also delete any remote refs that don't exist locally (which is why
> you are seeing the ":.have" refspec above, which attempts to delete
> it).

Is there some way of doing that?  (We do use a branch during releases
that is deleted after the release, so I need to propagate these
deletions.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing with --mirror over HTTP?
  2011-09-08  2:58   ` Eli Barzilay
@ 2011-12-19 17:12     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2011-12-19 17:12 UTC (permalink / raw)
  To: Eli Barzilay; +Cc: git

On Wed, Sep 07, 2011 at 10:58:16PM -0400, Eli Barzilay wrote:

> 5 hours ago, Jeff King wrote:
> > On Mon, Sep 05, 2011 at 12:05:37AM -0400, Eli Barzilay wrote:
> > 
> > > Is there anything broken with pushing with mirror over HTTP?  I'm
> > > trying that with a github url, and I get a broken-looking error
> > > message:
> > > 
> > >   remote part of refspec is not a valid name in :.have
> > 
> > It's probably nothing to do with http, but rather with alternate
> > object databases on the server (which GitHub uses heavily). The
> > server hands out fake ".have" refs telling you it has some other
> > branch tips to base packs off of. So I suspect the "push --mirror"
> > code is simply wrong for trying to update those refs (it may be
> > exacerbated by using http, though, as the remote helper code seems
> > to have some extra checks).

Sorry for the very delayed response on your bug, but at least I have
good news. :)

It should be fixed by:

  http://article.gmane.org/gmane.comp.version-control.git/187373

(I was trying to fix another bug there, but see my followup for a
discussion of .have).

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-19 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05  4:05 Pushing with --mirror over HTTP? Eli Barzilay
2011-09-07 21:39 ` Jeff King
2011-09-08  2:58   ` Eli Barzilay
2011-12-19 17:12     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.