git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eli Barzilay <eli@barzilay.org>
Cc: git@vger.kernel.org
Subject: Re: Pushing with --mirror over HTTP?
Date: Wed, 7 Sep 2011 17:39:50 -0400	[thread overview]
Message-ID: <20110907213950.GI13364@sigill.intra.peff.net> (raw)
In-Reply-To: <20068.19089.303108.950233@winooski.ccs.neu.edu>

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

  reply	other threads:[~2011-09-07 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05  4:05 Pushing with --mirror over HTTP? Eli Barzilay
2011-09-07 21:39 ` Jeff King [this message]
2011-09-08  2:58   ` Eli Barzilay
2011-12-19 17:12     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110907213950.GI13364@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=eli@barzilay.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).