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

Re: To graft or not to graft... (Re: Recovering from repository corruption)

From
Jeff King <peff@peff.net>
Date
Jun 12, 2008, 07:47 UTC
Message-ID
<20080612074752.GA507@sigill.intra.peff.net>
In-Reply-To
<200806120914.22083.johan@herland.net>
On Thu, Jun 12, 2008 at 09:14:21AM +0200, Johan Herland wrote:
Show 13 quoted lines
> > The grafts file isn't part of the object stream and refs, and clones (and
> > fetches) very much just copy the object database.
> 
> AFAICS, there's already a perfectly fine way to distribute grafted history:
> 1. Add a grafts file
> 2. Run git-filter-branch
> 3. Remove grafts file
> 4. Distribute repo
> 5. Profit!
> 
> Since git-filter-branch turns grafted parentage into _real_ parentage,
> there's no point in ever having a grafts file at all (except transiently
> for telling git-filter-branch what to do).

But then you have rewritten all of the later commits, so you can no longer talk to other people about them.

The kernel repo is split into "historical" and active repos. You can graft the historical repo and get more far-reaching answers to things like "git log" and "git blame". But if you run filter-branch, you can't share development on that repo via push / pull to people who _don't_ use the graft, since they don't share your history (and they probably don't want to, because of the extra resources required to pull in the historical chunk).

That being said, I don't know how common such a setup is. And you did mention a "follow-grafts" config option for such people.

-Peff
Previous: Johan HerlandNext: Johan Herland
Message 27 of 31 in “Recovering from repository corruption”
  1. Denis BuenoJun 10, 2008
  2. Jakub NarebskiJun 10, 2008
  3. Denis BuenoJun 10, 2008
  4. Jakub NarebskiJun 10, 2008
  5. Denis BuenoJun 10, 2008
  6. Jakub NarebskiJun 10, 2008
  7. Denis BuenoJun 10, 2008
  8. Linus TorvaldsJun 10, 2008
  9. Denis BuenoJun 10, 2008
  10. Linus TorvaldsJun 10, 2008
  11. Denis BuenoJun 10, 2008
  12. Linus TorvaldsJun 10, 2008
  13. Denis BuenoJun 10, 2008
  14. TarmiganJun 10, 2008
  15. Denis BuenoJun 10, 2008
  16. Linus TorvaldsJun 10, 2008
  17. Linus TorvaldsJun 10, 2008
  18. Nicolas PitreJun 11, 2008
  19. Linus TorvaldsJun 11, 2008
  20. Nicolas PitreJun 11, 2008
  21. Denis BuenoJun 10, 2008
  22. Junio C HamanoJun 10, 2008
  23. To graft or not to graft... (Re: Recovering from repository corruption)Stephen R. van den Berg, Jun 11, 2008
  24. Jakub NarebskiJun 11, 2008
  25. Linus TorvaldsJun 11, 2008
  26. Johan HerlandJun 12, 2008
  27. Jeff KingJun 12, 2008
  28. Johan HerlandJun 12, 2008
  29. Stephen R. van den BergJun 12, 2008
  30. Nicolas PitreJun 10, 2008
  31. Denis BuenoJun 10, 2008

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.