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

Re: [QUESTION] about .git/info/grafts file

From
FFranck <vagabon.xyz@gmail.com>
Date
Jan 20, 2006, 10:07 UTC
Message-ID
<cda58cb80601200207g7c3495ddx@mail.gmail.com>
In-Reply-To
<7virsf7lb9.fsf@assigned-by-dhcp.cox.net>
2006/1/20, Junio C Hamano <junkio@cox.net>:
Show 23 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
>
> > It _might_ work if you tell your downloader to have a proper
> > graft file in his repository to cauterize the commit ancestry
> > chain _before_ he pulls from you, though.  I haven't tried it
> > (and honestly I did not feel that is something important to
> > support, so it might work by accident but that is not by
> > design).
>
> I just tried it and it actually works.
>
>         $ git clone git.git junk
>         $ cd junk ;# I am not brave enough to risk the real thing ;-)
>         $ git rev-parse master~4 >.git/refs/info/grafts
>         $ cd ..
>         $ mkdir cloned
>         $ cd cloned
>         $ git init-db
>         $ cp ../junk/.git/info/grafts .git/info/
>         $ git clone-pack ../baz
>         $ git fsck-objects --full
>         $ git log --pretty=short | cat
>
Just to be sure, what you call baz is actually junk ?
> This "only the tip of the git.git" repository has about 450
> objects in it, fully packed because of clone-pack, with one 680K
> packfile.

I tried that but I don't have same results. Did you delete all branchs except master before running clone-pack ? In my case I cloned the whole thing. So junk and cloned repos are the same size

> I think the true full history of git.git/ packed into
> one is aruond a 5MB packfile.  I suspect a bigger repository
> would not see that much size reduction, as Linus already
> explained here.

sorry, but I didn't understand his explaination, surely because of my very limited knowledge about git internals...

Show 5 quoted lines
>
> You could emulate what I just did above to prepare the
> equivalent of "baz" above, and make it available over git://
> protocol, say at git://franck.example.com/franck.git/.
>

does the git protocol is really needed in your example ? or can rsync work fine too since "franck.git" repo is cautorized so every objects of this repo shouldn't be part of old history, so they should be usefull, no ?

Thanks.
--
               Franck
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 21 in “[QUESTION] about .git/info/grafts file”
  1. FranckJan 17, 2006
  2. FranckJan 18, 2006
  3. Junio C HamanoJan 19, 2006
  4. FranckJan 19, 2006
  5. Petr BaudisJan 19, 2006
  6. Linus TorvaldsJan 19, 2006
  7. FranckJan 19, 2006
  8. Linus TorvaldsJan 19, 2006
  9. Junio C HamanoJan 19, 2006
  10. Junio C HamanoJan 19, 2006
  11. FranckJan 20, 2006
  12. Andreas EricssonJan 19, 2006
  13. Petr BaudisJan 19, 2006
  14. FranckJan 19, 2006
  15. Andreas EricssonJan 19, 2006
  16. Petr BaudisJan 19, 2006
  17. Petr BaudisJan 19, 2006
  18. Ryan AndersonJan 20, 2006
  19. Junio C HamanoJan 20, 2006
  20. FranckJan 20, 2006
  21. Junio C HamanoJan 20, 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.