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 19, 2006, 10:51 UTC
Message-ID
<cda58cb80601190251v5251c8bdh@mail.gmail.com>
In-Reply-To
<7v8xtdrqwg.fsf@assigned-by-dhcp.cox.net>
Thanks Junio for answering
2006/1/19, Junio C Hamano <junkio@cox.net>:
Show 16 quoted lines
> Franck <vagabon.xyz@gmail.com> writes:
>
> > I'm wondering why the "grafts" files is not involved during
> > push/pull/clone operations ?
>
> Commit ancestry grafting is a local repository issue and even if
> you manage to lie to your local git that 300,000th commit is the
> epoch, the commit object you send out to the downloader would
> record its true parent (or parents, if it is a merge), so the
> downloader would want to go further back.  And no, rewriting
> that commit and feeding a parentless commit to the downloader is
> not an option, because such a commit object would have different
> object name and unpack-objects would be unhappy.
>
> If you choose not to have full history in your public repository
> for whatever reason (ISP server diskquota comes to mind)

well, dealing with a repo that has more than 300,000 objects becomes a burden. A lots of git commands are slow, and cloning it take a while !

Show 9 quoted lines
> that is
> OK, but be honest about it to your downloaders.  Tell them that
> you do not have the full history, and they first need to clone
> from some other repository you started your development upon, in
> order to use what you added upon.  "This repository does not
> have all the history -- please first clone from XX repository
> (you need at least xxx commit), and then do another 'git pull'
> from here", or something like that.
>

I don't try to hide or lie to my downloaders. I just want them to avoid to deal with totaly pointless history. My work have been started recently and is based on current XX repository. IMHO storing, dealing with objects which are more than 10 years old is useless.

I don't see why it is so bad to create a "grafted" repository ? I want it to be small but still want to merge by using git-resolve with XX repository.

Show 5 quoted lines
>
> >                $ git-merge-base master origin
> >                # nothing
>
> Maybe you did not use grafts properly to cauterize?
Well in my graft file I did:
                    $ cat > .git/info/grafts
                    <shaid> <shaid>
                    $

By reading "Documentation/repository-layout.txt", I thought it would have been the right thing to do. If I did the same like you did ie:

                    $ cat > .git/info/grafts
                    <shaid>
                    $
It works.
Thanks
--
               Franck
Previous: Junio C HamanoNext: Petr Baudis
Message 4 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.