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

Re: Handling large files with GIT

From
Ben Clifford <benc@hawaga.org.uk>
Date
Feb 13, 2006, 01:26 UTC
Message-ID
<Pine.OSX.4.64.0602131416530.25089@piva.hawaga.org.uk>
In-Reply-To
<46a038f90602081435x49e53a1cgdc56040a19768adb@mail.gmail.com>
On Thu, 9 Feb 2006, Martin Langhoff wrote:
> I did suggest maildir,  where GIT is bound to do well as the content
> of the emails doesn't change but they just move around a lot. Though
> yes, trees are going to be nasty.

I've been keeping maildir in git for a few months, with mail being delivered into a git repo on one (permanently connected) host and me merging that branch into a repo on my laptop for reading (the intention being that I should be able to sync it back to the permanently connected host as I sometimes read mail there.

Alas, the merge part of this absolutely sucks -- as time goes by, its getting slower and slower (its taking an hour or so to do the merge, which has got to the point of being barely usable -- if it wasn't for the neat hack-value, I'd have given up on this by now).

I haven't really probed whats happening when I'm doing the merges in any depth, but I see a lot of index manipulation happening (git update-index, I think) to add and remove files where each invocation of that seems to be taking almost a whole second.

I wonder if the present merge algorithms perform especially badly in the case of a large number of files with lots of renames (and so lots of adds/removes) but no content changes? The merge should be able to happen entirely in the index, I think.

Perhaps one way to proceed would be for me to write a move-optimised merge strategy where I flip the index round and instead of saying "how has the content inside this filename changed?" I instead say "how has the filename associated with this content <hash> changed?"

A special-case on top of a move-optimised merge might be some maildir-aware filename handling that knows how to resolve conflicts when a particular content-hash has been renamed to two different names (eg. when one flag is added to a message in one repo and a different flag is added to a message in another repo).

Any advice/thoughts/suggestions-that-this-is-a-stupid-thing-to-do would be greatly appreciated.

Previous: Martin LanghoffNext: Linus Torvalds
Message 8 of 39 in “Handling large files with GIT”
  1. Martin LanghoffFeb 8, 2006
  2. Johannes SchindelinFeb 8, 2006
  3. Linus TorvaldsFeb 8, 2006
  4. Linus TorvaldsFeb 8, 2006
  5. Junio C HamanoFeb 8, 2006
  6. Florian WeimerFeb 8, 2006
  7. Martin LanghoffFeb 8, 2006
  8. Ben CliffordFeb 13, 2006
  9. Linus TorvaldsFeb 13, 2006
  10. Linus TorvaldsFeb 13, 2006
  11. Linus TorvaldsFeb 13, 2006
  12. Ian MoltonFeb 13, 2006
  13. Martin LanghoffFeb 13, 2006
  14. Johannes SchindelinFeb 14, 2006
  15. Linus TorvaldsFeb 14, 2006
  16. Sam VilainFeb 14, 2006
  17. Linus TorvaldsFeb 14, 2006
  18. Junio C HamanoFeb 14, 2006
  19. Sam VilainFeb 15, 2006
  20. Junio C HamanoFeb 15, 2006
  21. Sam VilainFeb 15, 2006
  22. Martin LanghoffFeb 15, 2006
  23. Linus TorvaldsFeb 15, 2006
  24. Linus TorvaldsFeb 15, 2006
  25. Linus TorvaldsFeb 15, 2006
  26. Linus TorvaldsFeb 15, 2006
  27. Junio C HamanoFeb 15, 2006
  28. Linus TorvaldsFeb 15, 2006
  29. Linus TorvaldsFeb 15, 2006
  30. Linus TorvaldsFeb 16, 2006
  31. Junio C HamanoFeb 16, 2006
  32. Fredrik KuivinenFeb 16, 2006
  33. Jeff GarzikFeb 13, 2006
  34. Keith PackardFeb 13, 2006
  35. Martin LanghoffFeb 14, 2006
  36. Linus TorvaldsFeb 13, 2006
  37. Martin LanghoffFeb 13, 2006
  38. Greg KHFeb 9, 2006
  39. Martin LanghoffFeb 9, 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.