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

Re: Committing crimes with NTFS-3G

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 30, 2024, 00:47 UTC
Message-ID
<ZtEWvQOwLPgjIFks@tapette.crustytoothpaste.net>
In-Reply-To
<7d1dad03-703c-47ae-a039-c15aa765fd0b@gaijin.team>
On 2024-08-29 at 20:43:40, Roman Sandu wrote:
Show 9 quoted lines
> Good day!
> 
> I have a decently sized (80K files) monorepo on an NTFS drive that I have
> been working with for a while under Windows via git-for-windows. Recently, I
> had to (temporarily) switch to Ubuntu (24.04) via dual-boot for irrelevant
> reasons, and I decided that simply mounting my NTFS drive and using the
> monorepo from Ubuntu is a great idea, actually, as NTFS-3G allow for
> seamless interop with NTFS via UserMapping. And so that is exactly what I
> did and It Just Works!

In general, I would not recommend this. NTFS doesn't support Unix permissions, so I'd expect a lot of things to be broken. A lot of people like using NTFS to share data across Windows and Linux, but UDF is a much better choice and I'm not surprised that NTFS isn't working the way you'd expect.

Also, when you share a repository across systems, you should expect the index to be fully refreshed each time you change the OS, reading every file in the repository[0].

> So, what do I do about this? It honestly looks like a git bug to me, maybe
> it silently fails to update the index with new timestamps because it was
> initially created on Windows? But I have no clue how to narrow this issue
> down further, so any ideas or suggestions would be appreciated!

Can you pick some file in your repository and run `stat` on it, before and after running `git status`, and include the output?

For example:
  stat http.c | tee /tmp/before
  git status
  stat http.c | tee /tmp/after
  sha256sum /tmp/before /tmp/after

My guess is that NTFS-3G is not emulating something properly and it's differing at some point.

[0] https://git-scm.com/docs/gitfaq#sync-working-tree
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Roman SanduNext: Roman Sandu
Message 2 of 14 in “Committing crimes with NTFS-3G”
  1. Roman SanduAug 29, 2024
  2. brian m. carlsonAug 30, 2024
  3. Roman SanduAug 30, 2024
  4. brian m. carlsonAug 30, 2024
  5. Roman SanduAug 30, 2024
  6. brian m. carlsonAug 30, 2024
  7. Roman SanduAug 30, 2024
  8. Vito CaputoAug 30, 2024
  9. Johannes SixtAug 30, 2024
  10. Roman SanduAug 30, 2024
  11. Junio C HamanoAug 30, 2024
  12. Torsten BögershausenSep 3, 2024
  13. Roman SanduSep 3, 2024
  14. Torsten BögershausenSep 5, 2024

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.