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

Re: removing content from git history

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 21, 2007, 18:24 UTC
Message-ID
<Pine.LNX.4.64.0702211016340.4043@woody.linux-foundation.org>
In-Reply-To
<Pine.LNX.4.64.0702210934470.4043@woody.linux-foundation.org>
On Wed, 21 Feb 2007, Linus Torvalds wrote:
Show 6 quoted lines
> 
>    For the kernel, it took 2 minutes, but again, it was exactly the same 
>    thing: just a few old tree objects that it rewrote, and as a result, 
>    every single commit SHA1 changed. Still, it was almost _only_ commits 
>    (it generated 49521 new objects, 49332 of which was the new commit 
>    history)

Side note: I wasn't entirelyaccurate. The kernel had trees with file mode 0644 for all the early commits, because my umask is 0022. So everything up to commit 4bfa437cf1 is shared after the conversion.

But the next one (commit 5dfa9c1b4f) introduced the file include/asm-mips/vr41xx/pci.h with file mode 0664, and I'm not 100% sure why that one happened with that file mode, but as a result, every single commit ever after will have a different SHA1, because the tree got rewritten (and subsequent commits - even if their trees did *not* get rewritten - will obviously have different parent SHA1's).

So 56 commits are shared, and "only" 49276 commits were rewritten (and apparently 245 trees).

			Linus
Previous: Linus TorvaldsNext: Shawn O. Pearce
Message 5 of 25 in “removing content from git history”
  1. Michael HendricksFeb 21, 2007
  2. Shawn O. PearceFeb 21, 2007
  3. J. Bruce FieldsFeb 21, 2007
  4. Linus TorvaldsFeb 21, 2007
  5. Linus TorvaldsFeb 21, 2007
  6. Shawn O. PearceFeb 21, 2007
  7. Linus TorvaldsFeb 21, 2007
  8. Shawn O. PearceFeb 21, 2007
  9. Bill LearOct 9, 2007
  10. J. Bruce FieldsOct 9, 2007
  11. Bill LearOct 9, 2007
  12. Johannes SchindelinOct 10, 2007
  13. Linus TorvaldsFeb 21, 2007
  14. Nicolas PitreFeb 21, 2007
  15. Linus TorvaldsFeb 21, 2007
  16. Nicolas PitreFeb 21, 2007
  17. Michael HendricksFeb 21, 2007
  18. Shawn O. PearceFeb 21, 2007
  19. Linus TorvaldsFeb 21, 2007
  20. Linus TorvaldsFeb 21, 2007
  21. Nicolas PitreFeb 21, 2007
  22. Junio C HamanoFeb 21, 2007
  23. Nicolas PitreFeb 21, 2007
  24. Junio C HamanoFeb 21, 2007
  25. Nicolas PitreFeb 21, 2007

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.