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

Re: efficient cloning

From
Petr Baudis <pasky@suse.cz>
Date
Mar 21, 2006, 11:29 UTC
Message-ID
<20060321112952.GR18185@pasky.or.cz>
In-Reply-To
<7vy7z4f7x3.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Tue, Mar 21, 2006 at 10:45:12AM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 23 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Then why not create .git/refs/remotes/$origin/HEAD at the time of clone
> > (or later)? Then the core looks for:
> >   (current order, .git/refs, etc)
> >   .git/refs/remotes/foo
> >   .git/refs/remotes/foo/HEAD
> > The porcelain can take care of managing the contents of HEAD. If there
> > is no HEAD in the directory, then it cannot be looked up by 'foo'
> > ('foo/remote-branch' must be used instead).
> 
> Yup, earlier I mentioned that possibility, and it does not seem
> too painful.  On top of the "next", here is what is needed.
> 
> -- >8 --
> [PATCH] get_sha1_basic(): try refs/... and finally refs/remotes/$foo/HEAD
> 
> This implements the suggestion by Jeff King to use
> refs/remotes/$foo/HEAD to interpret a shorthand "$foo" to mean
> the primary branch head of a tracked remote.  clone needs to be
> told about this convention as well.
> 
> Signed-off-by: Junio C Hamano <junkio@cox.net>
Excellent, yes, that's what I've meant. I'm happy now. :)
Thanks,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Previous: Junio C HamanoNext: Josef Weidendorfer
Message 19 of 22 in “efficient cloning”
  1. James CloosMar 19, 2006
  2. Shawn PearceMar 19, 2006
  3. Junio C HamanoMar 19, 2006
  4. James CloosMar 20, 2006
  5. Junio C HamanoMar 20, 2006
  6. Junio C HamanoMar 20, 2006
  7. Petr BaudisMar 20, 2006
  8. Junio C HamanoMar 20, 2006
  9. Petr BaudisMar 20, 2006
  10. Junio C HamanoMar 20, 2006
  11. Josef WeidendorferMar 20, 2006
  12. Junio C HamanoMar 20, 2006
  13. Petr BaudisMar 20, 2006
  14. Junio C HamanoMar 20, 2006
  15. Andreas EricssonMar 21, 2006
  16. Junio C HamanoMar 21, 2006
  17. Jeff KingMar 21, 2006
  18. Junio C HamanoMar 21, 2006
  19. Petr BaudisMar 21, 2006
  20. Josef WeidendorferMar 21, 2006
  21. Junio C HamanoMar 21, 2006
  22. Junio C HamanoMar 21, 2006

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.