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

Re: Can git be tweaked to work cross-platform, on FAT32?

From
JRJuergen Ruehle <j.ruehle@bmiag.de>
Date
Dec 17, 2006, 18:16 UTC
Message-ID
<17797.35177.550000.996862@lapjr.intranet.kiel.bmiag.de>
In-Reply-To
<906f26060612170633h50e3e974h3b84f1829e546278@mail.gmail.com>
Stefano Spinucci writes:
 > I just tried to use git writing to my FAT32 formatted usb stick.
 > 
 > On windows XP, I compiled git with and without NO_D_TYPE_IN_DIRENT,
 > but after the
 > following actions I always got the error "fatal: Unable to write new
 > index file" or
 > "fatal: unable to create '.git/index': File exists":

Compile git with NO_MMAP. The problem is that the old index file is mmaped while it is replaced. Cygwin supports this operation only on NTFS. I don't know whether this is a bug in cygwin or a windows limitation (I suspect the latter).

Unfortunately NO_MMAP makes git pretty slow if the pack files get larger than about 10-20 MB.

Johannes claims that there are additional problems with mmap on cygwin, but it passes the complete test suite on NTFS, so it should be ok for most operations

IIRC it has been suggested on the list that mmaping the index isn't that important for git performance and it could be replaced by simply reading the index file into memory on access.

It would be nice to have mmap work on non-NTFS partitions since my tests suggest that FAT32 is up to twice as fast (in the hot cache case). (My test version simply uses an unlink before the rename in lockfile.c to hack around the cygwin rename problem.)

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 9 of 15 in “Can git be tweaked to work cross-platform, on FAT32?”
  1. Florian v. SavignyDec 13, 2006
  2. Johannes SchindelinDec 13, 2006
  3. Martin LanghoffDec 14, 2006
  4. Florian v. SavignyDec 16, 2006
  5. Johannes SchindelinDec 16, 2006
  6. Martin LanghoffDec 17, 2006
  7. Stefano SpinucciDec 17, 2006
  8. Johannes SchindelinDec 17, 2006
  9. Juergen RuehleDec 17, 2006
  10. Johannes SchindelinDec 17, 2006
  11. Stefano SpinucciDec 18, 2006
  12. Johannes SchindelinDec 18, 2006
  13. Juergen RuehleDec 18, 2006
  14. Dan NicholsonDec 19, 2006
  15. David LangDec 19, 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.