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

Re: git-fast-import

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 7, 2007, 22:55 UTC
Message-ID
<20070207225532.GA1970@spearce.org>
In-Reply-To
<Pine.LNX.4.63.0702071216330.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 6 quoted lines
> On Wed, 7 Feb 2007, Karl Hasselström wrote:
> > In other words, general history rewriting, but fast.
> 
> For this, it would be better to use a different approach: fast-import 
> still hashes all the objects, which would not be necessary when rewriting. 
> I guess that is what cogito's tool is doing.
gfi doesn't require that it rehash blob objects.

If the blobs in question are already available in the repository gfi is running against (say, from the old branch history) you can just feed those blob SHA-1s at gfi in its 'M' commands when making commits. Yes gfi will need to recompute the tree hashes from scratch, but those are certainly smaller and faster to create than blobs.

So you probably could make a faster history rewriter by taking the output of say `git log --pretty=raw --raw -z`, filter that and reverse it, and stream it into gfi. It probably would kick Cogito's cg-admin-rewritefilter thing in the teeth, as you are forking just one gfi process rather than a thousand git-commit-tree processes.

And if you are doing more complex pathname translations than just picking out a subtree, it also completely avoids needing to read and write index files via update-index, or tree objects by write-tree.

-- 
Shawn.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 19 of 49 in “git-fast-import”
  1. Shawn O. PearceFeb 6, 2007
  2. Nicolas PitreFeb 6, 2007
  3. Nicolas PitreFeb 6, 2007
  4. Shawn O. PearceFeb 6, 2007
  5. Linus TorvaldsFeb 6, 2007
  6. Shawn O. PearceFeb 6, 2007
  7. Linus TorvaldsFeb 6, 2007
  8. Nicolas PitreFeb 6, 2007
  9. Shawn O. PearceFeb 6, 2007
  10. Nicolas PitreFeb 6, 2007
  11. Shawn O. PearceFeb 6, 2007
  12. Nicolas PitreFeb 6, 2007
  13. David WoodhouseFeb 7, 2007
  14. Aneesh Kumar K.VFeb 6, 2007
  15. Shawn O. PearceFeb 6, 2007
  16. Daniel BarkalowFeb 7, 2007
  17. Karl HasselströmFeb 7, 2007
  18. Johannes SchindelinFeb 7, 2007
  19. Shawn O. PearceFeb 7, 2007
  20. Johannes SchindelinFeb 7, 2007
  21. Shawn O. PearceFeb 8, 2007
  22. Linus TorvaldsFeb 8, 2007
  23. Shawn O. PearceFeb 8, 2007
  24. Karl HasselströmFeb 9, 2007
  25. Linus TorvaldsFeb 9, 2007
  26. Raimund BauerFeb 7, 2007
  27. David WoodhouseFeb 7, 2007
  28. Andy ParkinsFeb 6, 2007
  29. Shawn O. PearceFeb 6, 2007
  30. Linus TorvaldsFeb 6, 2007
  31. Shawn O. PearceFeb 6, 2007
  32. Linus TorvaldsFeb 6, 2007
  33. Horst H. von BrandFeb 7, 2007
  34. Linus TorvaldsFeb 7, 2007
  35. Shawn O. PearceFeb 7, 2007
  36. Karl HasselströmFeb 7, 2007
  37. Horst H. von BrandFeb 7, 2007
  38. Jakub NarebskiFeb 7, 2007
  39. Linus TorvaldsFeb 7, 2007
  40. Johannes SchindelinFeb 8, 2007
  41. Shawn O. PearceFeb 7, 2007
  42. Daniel BarkalowFeb 7, 2007
  43. Jakub NarebskiFeb 6, 2007
  44. Shawn O. PearceFeb 6, 2007
  45. Jakub NarebskiFeb 6, 2007
  46. Shawn O. PearceFeb 6, 2007
  47. Alex RiesenFeb 6, 2007
  48. Shawn O. PearceFeb 6, 2007
  49. Alex RiesenFeb 6, 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.