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

Re: [RFC PATCH 06/19] Factor ref updating out of fetch_with_import

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Nov 2, 2009, 01:33 UTC
Message-ID
<fabb9a1e0911011733o7d8d95eem57e02d455e0bd86@mail.gmail.com>
In-Reply-To
<alpine.LNX.2.00.0910301118070.14365@iabervon.org>
Heya,
On Fri, Oct 30, 2009 at 17:04, Daniel Barkalow <barkalow@iabervon.org> wrote:
> I think you have the sides backwards
Yup, sorry, got them the wrong way around for some reason.
Show 20 quoted lines
> On the other hand, I think it would make sense to use the same style of
> refspec between the helper and transport-helper.c such that the helper
> reports something like:
>
> refs/svn/origin/trunk:refs/heads/trunkr
> refs/svn/origin/branches/*:refs/heads/*
> refs/svn/origin/tags/*:refs/tags/*
>
> "list" gives:
>
> 000000...000 refs/heads/trunkr
>
> "import refs/heads/trunkr" imports the objects, but the refspecs have to
> be consulted by transport-helper.c in order to determine what ref to read
> to get the value of refs/heads/trunkr. Instead of getting the value with
> read_ref("refs/heads/trunkr", ...) like it does now, it would do
> read_ref("refs/svn/origin/trunk", ...). And systems like p4 that don't
> have a useful standard just wouldn't support the "refspec" command and
> people would have to do site-specific configuration to get anything
> useful.

Yes, that sounds very reasonable, and I think that's the right way to go. This leaves us with only one thing, we need a remote HEAD for 'git clone hg::/path/to/repo' to work and have it check out a branch, I think a seperate 'head' command might be appropriate? If supported it returns the which local symref (e.g. 'refs/heads/trunkr' in the svn case) should be pointed at by HEAD. If not supported we can just not set it and clone will give the default 'no remote HEAD, nothing checked out' message, which would probably be best for p4?

-- 
Cheers,

Sverre Rabbelier
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 17 of 43 in “Reroll of the remote-vcs-helper series”
  1. 0/19 Reroll of the remote-vcs-helper seriesSverre Rabbelier, Oct 29, 2009
  2. 01/19 Use a function to determine whether a remote is validSverre Rabbelier, Oct 29, 2009
  3. 02/19 Allow fetch to modify refsSverre Rabbelier, Oct 29, 2009
  4. Daniel BarkalowOct 30, 2009
  5. Sverre RabbelierOct 30, 2009
  6. Daniel BarkalowOct 30, 2009
  7. Sverre RabbelierOct 30, 2009
  8. 03/19 Allow programs to not depend on remotes having urlsSverre Rabbelier, Oct 29, 2009
  9. Daniel BarkalowOct 30, 2009
  10. Sverre RabbelierOct 30, 2009
  11. 04/19 Add a config option for remotes to specify a foreign vcsSverre Rabbelier, Oct 29, 2009
  12. 05/19 Add support for "import" helper commandSverre Rabbelier, Oct 29, 2009
  13. 06/19 Factor ref updating out of fetch_with_importSverre Rabbelier, Oct 29, 2009
  14. Daniel BarkalowOct 30, 2009
  15. Sverre RabbelierOct 30, 2009
  16. Daniel BarkalowOct 30, 2009
  17. Sverre RabbelierNov 2, 2009
  18. Daniel BarkalowNov 2, 2009
  19. Sverre RabbelierNov 2, 2009
  20. Daniel BarkalowNov 2, 2009
  21. 07/19 Allow helpers to report in "list" command that the ref is unchangedSverre Rabbelier, Oct 29, 2009
  22. 08/19 Fix memory leak in helper method for disconnectSverre Rabbelier, Oct 29, 2009
  23. 09/19 Finally make remote helper support usefulSverre Rabbelier, Oct 29, 2009
  24. 10/19 Allow helpers to request marks for fast-importSverre Rabbelier, Oct 29, 2009
  25. Johan HerlandOct 30, 2009
  26. Sverre RabbelierOct 30, 2009
  27. Johan HerlandOct 31, 2009
  28. Sverre RabbelierOct 31, 2009
  29. 11/19 Basic build infrastructure for Python scriptsSverre Rabbelier, Oct 29, 2009
  30. 12/19 1/2: Add Python support library for CVS remote helperSverre Rabbelier, Oct 29, 2009
  31. Johan HerlandOct 30, 2009
  32. Sverre RabbelierOct 30, 2009
  33. 13/19 2/2: Add Python support library for CVS remote helperSverre Rabbelier, Oct 29, 2009
  34. 14/19 git-remote-cvs: Remote helper program for CVS repositoriesSverre Rabbelier, Oct 29, 2009
  35. 15/19 Add simple selftests of git-remote-cvs functionalitySverre Rabbelier, Oct 29, 2009
  36. 16/19 Fix the Makefile-generated path to the git_remote_cvs package in git-remote-cvsSverre Rabbelier, Oct 29, 2009
  37. 17/19 More fixes to the git-remote-cvs installation procedureSverre Rabbelier, Oct 29, 2009
  38. 18/19 Refactor git_remote_cvs to a more generic git_remote_helpersSverre Rabbelier, Oct 29, 2009
  39. Johan HerlandOct 30, 2009
  40. Sverre RabbelierOct 30, 2009
  41. 19/19 .gitignore: add git-remote-cvsSverre Rabbelier, Oct 29, 2009
  42. Shawn O. PearceOct 29, 2009
  43. Sverre RabbelierOct 29, 2009

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.