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

Re: removing content from git history

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 21, 2007, 21:21 UTC
Message-ID
<20070221212129.GD26525@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0702211306520.4043@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> The probnlem there is that most conversion scripts that use 
> "write_sha1_file()" will want to *read* that file later. If 
> git-fast-import hasn't generated the pack yet (because it's still waiting 
> for more data), that will not work at all.
Yes, indeed...
 
Show 7 quoted lines
> So then you basically force the conversion script to keep remembering all 
> the old object data (using something like pretend_sha1_file), or you limit 
> it to things that just always re-write the whole object and never need any 
> old object references that they might have written.
> 
> A lot of conversions tend to be incremental, ie they will depend on the 
> data they converted previously.

Which is why I was actually thinking of flipping this on its head. Libify git-apply and embed that into fast-import, then one of the native input formats might just be an mbox, or something close enough that a simple C/perl/sed prefilter could make an mbox into the input.

fast-import can (and does if necessary) go back to access the packfile it is writing. It has the index data held in memory and uses only OBJ_OFS_REF so that sha1_file.c can unpack deltas just fine, even though we lack an index file and have not completely checksummed the pack itself.

So although no other Git process can use the packfile, it is usuable from within fast-import...

-- 
Shawn.
Previous: Linus TorvaldsNext: Bill Lear
Message 8 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.