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

Re: Cogito: cg-clone doesn't like packed tag objects

From
Junio C Hamano <junkio@cox.net>
Date
Sep 24, 2005, 18:10 UTC
Message-ID
<7virwqwd3z.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050924125001.GB25069@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
Show 7 quoted lines
>> I think you could run git-peek-remote to find all the refs and
>> then run git-fetch-pack to slurp all the tags (and heads for
>> that matter) at once.  Is there a particular reason you would
>> prefer the commit walker?
>
> Actually, probably not, except consistency with rsync and http handling
> - but that's obviously not too good reason.

We would end up doing things internally differently between git-native (fetch/clone-pack) and other protocols (commit walker which is git-aware, and rsync which is not) anyway.

I misspoke for 'git-fetch-pack' in the above -- git-fetch-pack without any refspec fetches all the refs, so you do not need a separate peek-remote. Right now 'git fetch' wrapper does not let you take advantage of this, but if we wanted to add '--all' flag to 'git fetch' wrapper, it can be implemented very easily and efficiently for the git-native protocol. An implementation of such a flag for other protocols would use git-ls-remote to find out the refs upfront.

> I will probably rewrite the tags fetching to use git-peek-remote
> (info/refs for http) the next weekend.

If you are targetting multiple protocols, git-ls-remote is the one to use, not peek-remote. It internally uses peek-remote for git-native protocol, and emulates it using info/refs for http and recursive get for rsync, so no new coding on Cogito part should be necessary.

Show 5 quoted lines
> default post-update hook could change to
>
> 	[ -e "$_git/git-dummy-support" ] && exec git-update-server-info
>
> and be enabled by default?

That is a thought. While I think doing update-server-info everywhere whenever you update ref is going a bit overboard, I agree there should be an easy way for the end user to keep repositories that are public accessible all times. But running server-info upon every commit does not make much sense to me -- something is seriously broken if we need to do that.

Cases when you would want to make your repository accessible from outside itself varies and preferred transport obviously depends on it.

 - Your private working area.  Typically does not allow
   anonymous downloads.  You are the only one to use git tools
   and compilation there (that's what 'private' means).
 - A CVS style shared repository.  May allow anonymous
   downloads, and allow uploads to people with 'commit
   privilege' in CVS lingo.
 - A public distribution point, like kernel.org repository.
   This is just a special case of the 'shared repository' above,
   with yourself as the only uploader.

I thought there would be more classes, but it really boils down to whether you would allow anonymous downloads or not -- so let's call them private and public.

Fetching over non git-native protocol is the only case where server-info matters; so obviously it is nicer if public repository is arranged so that update-server-info is run everytime refs and set of packs change.

I do not think of a good reason not to use git-aware protocol when one is fetching from a private repo -- so if we just say people should not use non git-aware protocol when doing so, we do not have to do server-info in the private repositories at all.

So the question is, how often do we need to run update to keep the refs and set of packs in public repository in sync with the server-info. What do people do in public repository to affect set of packs and the refs?

 - Initiate a push into it from somewhere else; this case is
   covered by enabling post-update hook.
 - You log on to the machine of public repository and run 'git
   repack'; this runs update-server-info, so it is OK.
 - You log on to the machine of public repository and run fetch
   of another repository -- you may even end up hand merging and
   creating new commits.
 - You log on to the machine of public repository and do your
   development, making your own commits.

It is the latter two cases where your 'update-server-info everywhere in Cogito' would be needed -- but is it realistic?

Previous: Daniel BarkalowNext: Petr Baudis
Message 7 of 41 in “Cogito: cg-clone doesn't like packed tag objects”
  1. H. Peter AnvinSep 23, 2005
  2. Petr BaudisSep 24, 2005
  3. H. Peter AnvinSep 24, 2005
  4. Junio C HamanoSep 24, 2005
  5. Petr BaudisSep 24, 2005
  6. Daniel BarkalowSep 24, 2005
  7. Junio C HamanoSep 24, 2005
  8. Petr BaudisNov 9, 2005
  9. Junio C HamanoNov 9, 2005
  10. Nick HengeveldNov 9, 2005
  11. Petr BaudisNov 9, 2005
  12. Nick HengeveldNov 10, 2005
  13. Junio C HamanoNov 9, 2005
  14. Petr BaudisSep 26, 2005
  15. Brian GerstSep 26, 2005
  16. Petr BaudisSep 26, 2005
  17. Junio C HamanoSep 26, 2005
  18. Petr BaudisSep 26, 2005
  19. Junio C HamanoSep 27, 2005
  20. Tom PrinceSep 27, 2005
  21. Junio C HamanoSep 27, 2005
  22. Junio C HamanoSep 26, 2005
  23. Petr BaudisSep 27, 2005
  24. Josef WeidendorferSep 27, 2005
  25. Petr BaudisSep 27, 2005
  26. Josef WeidendorferSep 27, 2005
  27. Junio C HamanoSep 27, 2005
  28. Linus TorvaldsSep 27, 2005
  29. Junio C HamanoSep 27, 2005
  30. Linus TorvaldsSep 27, 2005
  31. Linus TorvaldsSep 27, 2005
  32. Junio C HamanoSep 27, 2005
  33. Junio C HamanoSep 28, 2005
  34. Peeling the onionJunio C Hamano, Oct 14, 2005
  35. Sven VerdoolaegeSep 27, 2005
  36. Ryan AndersonSep 27, 2005
  37. Linus TorvaldsSep 27, 2005
  38. Ryan AndersonSep 27, 2005
  39. Linus TorvaldsSep 27, 2005
  40. Junio C HamanoSep 27, 2005
  41. Junio C HamanoOct 14, 2005

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.