git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: [PATCH 2/2] transport-helper: update remote helper namespace
Date: Thu, 11 Apr 2013 00:33:46 -0400	[thread overview]
Message-ID: <20130411043346.GE14551@sigill.intra.peff.net> (raw)
In-Reply-To: <1365638832-9000-3-git-send-email-felipe.contreras@gmail.com>

On Wed, Apr 10, 2013 at 07:07:12PM -0500, Felipe Contreras wrote:

> When pushing, the remote namespace is updated correctly
> (e.g. refs/origin/master), but not the remote helper's
> (e.g. refs/testgit/origin/master).
> 
> Let's update it correctly.

I would have thought it was the helper's responsibility to update these.
Obviously remote-testgit can handle this fine, but will any other
helpers be using these refs as a marker to know the last point they
imported, and get confused if we update the refs behind their back?

For example, during the import, a helper might know that it has imported
up to X on a foreign vcs, and that resulted in commit Y in git, which it
stored in refs/$helper/heads/master during the last import. When we
fetch from it again, it picks up from X to the tip of the foreign vcs,
and then imports that history on top of commit Y.

But if we push some commits to the helper, moving Y up to Z, then it
would build the new commit (which contains the foreign-vcs's equivalent of
Y..Z) on top of Z, not Y.

I do not offhand know of any helpers that are implemented this way,
though. vcs-svn does not seem to use the refspec feature at all, and I
assume that your hg/bzr helpers do not have this problem. So perhaps it
is not worth worrying about.

-Peff

  reply	other threads:[~2013-04-11  4:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11  0:07 [PATCH 0/2] transport-helper: general fixes Felipe Contreras
2013-04-11  0:07 ` [PATCH 1/2] transport-helper: improve push messages Felipe Contreras
2013-04-11  3:41   ` Jeff King
2013-04-11  0:07 ` [PATCH 2/2] transport-helper: update remote helper namespace Felipe Contreras
2013-04-11  4:33   ` Jeff King [this message]
2013-04-11  4:53     ` Felipe Contreras
2013-04-11  5:05       ` Jeff King
2013-04-11  5:18         ` Felipe Contreras
2013-04-13  6:00           ` Felipe Contreras
2013-04-14  5:13             ` Junio C Hamano
2013-04-14 15:42               ` Felipe Contreras
2013-04-14 18:45                 ` Junio C Hamano
2013-04-14 19:00                   ` Jeff King
2013-04-16  0:56                   ` Jonathan Nieder

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=20130411043346.GE14551@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=srabbelier@gmail.com \
    /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).