git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] transport-helper: update remote helper namespace

From
Jeff King <peff@peff.net>
Date
Apr 11, 2013, 04:33 UTC
Message-ID
<20130411043346.GE14551@sigill.intra.peff.net>
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:
Show 5 quoted lines
> 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
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 14 in “transport-helper: general fixes”
  1. 0/2 transport-helper: general fixesFelipe Contreras, Apr 11, 2013
  2. 1/2 transport-helper: improve push messagesFelipe Contreras, Apr 11, 2013
  3. Jeff KingApr 11, 2013
  4. 2/2 transport-helper: update remote helper namespaceFelipe Contreras, Apr 11, 2013
  5. Jeff KingApr 11, 2013
  6. Felipe ContrerasApr 11, 2013
  7. Jeff KingApr 11, 2013
  8. Felipe ContrerasApr 11, 2013
  9. Felipe ContrerasApr 13, 2013
  10. Junio C HamanoApr 14, 2013
  11. Felipe ContrerasApr 14, 2013
  12. Junio C HamanoApr 14, 2013
  13. Jeff KingApr 14, 2013
  14. Jonathan NiederApr 16, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.