Re: [PATCH 06/19] git_remote_helpers: push all refs during a non-local export
- From
Jeff King <peff@peff.net>
- Date
- Jun 8, 2011, 22:19 UTC
- Message-ID
- <20110608221908.GB15530@sigill.intra.peff.net>
- In-Reply-To
- <20110608194205.GI27715@elie>
On Wed, Jun 08, 2011 at 02:42:05PM -0500, Jonathan Nieder wrote:
Show 14 quoted lines
> Sverre Rabbelier wrote:
>
> > --- a/git_remote_helpers/git/non_local.py
> > +++ b/git_remote_helpers/git/non_local.py
> > @@ -63,7 +63,7 @@ class NonLocalGit(object):
> > if not os.path.exists(path):
> > die("could not find repo at %s", path)
> >
> > - args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath]
> > + args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath, "--all"]
> > child = subprocess.Popen(args)
>
> Does this deal with forced (non-fast-forward) pushes? (Not a
> complaint, just curious.)No, nor can it. The problem is that any information about the ref mapping or force-state is lost. All the helper sees is that stuff got put into the staging repo, and it has to move it over.
If we do a fix that allows "refs/heads/foo:refs/heads/bar", then it should also properly allow "+refs/heads/foo:refs/heads/bar". Which I think means changing the single "export" command in the ref-helper to something like:
export refs/heads/foo export refs/heads/foo:refs/heads/bar export +refs/heads/force
-Peff