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