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 18, 2006, 17:47 UTC
Message-ID
<cda58cb80601180947j48a5396t@mail.gmail.com>
In-Reply-To
<cda58cb80601170932o6f955469y@mail.gmail.com>
Hi,
Could anybody shed some light there ? It would be very nice.
Thanks
                  Franck
2006/1/17, Franck <vagabon.xyz@gmail.com>:
Show 54 quoted lines
> Hi,
>
> I'm wondering why the "grafts" files is not involved during
> push/pull/clone operations ?
>
> Another question regarding grafting use case. Let's say I have my
> origin branch looks like:
>
>                origin ---0---1---<snip>---300 000---300 001---300 002
>
> Let's say that the 300 000th commit is where I started my work by using:
>
>                $ git-checkout -b master <300 000 shaid>
>
> I do some work on master branch and get the following
>
>                                                  a---b---c---d master
>                                                 /
>                origin ---0---1---...---300,000---300,001---300,002
>
> Now, I would like to make my own public repository based on my work
> but before pushing master branch in that repo I would like to get rid
> of all unused commits [0 299,999]. Indeed each of these commits do not
> have useful history for my work. So I used grafts things to have:
>
>                               a---b---c---d master
>                              /
>                origin 300,000---300,001---300,002
>
> But now if I ask to git for:
>
>                $ git-merge-base master origin
>                # nothing
>
> So git failed to found the common commit object which should be 300,000. Why ?
>
> In other the hand, if I use grafting to get:
>
>                                                a---b---c---d master
>                                               /
>                origin 2999,999---300,000---300,001---300,002
>
>               $ git-merge-base master origin
>               2dcaaf2decd31ac9a21d616604c0a7c1fa65d5a4
>
> So now git found the common commit. Can anybody explain me why ?
>
> Do you think it's a good usage of git ? Or should I do otherwise to
> setup my public repository ?
>
> Thanks
> --
>                Franck
>
Previous: FranckNext: Junio C Hamano
Message 2 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.