Re: Committing crimes with NTFS-3G
- From
- Roman Sandu <r.sandu@gaijin.team>
- Date
- Aug 30, 2024, 12:52 UTC
- Message-ID
- <3eda2715-3b44-469e-85d5-f25504212928@gaijin.team>
- In-Reply-To
- <ZtEWvQOwLPgjIFks@tapette.crustytoothpaste.net>
Yes, I am aware that the index will be fully refreshed on the first run of status. That is completely acceptable. But that is not what I am observing, it is being refreshed on every single run of `git status`!
After running stat before and after a status, the sha256 is identical. Both for files and for folders. Maybe Windows has somehow corrupted the index with its negative aura which makes git invalidate it on every single run? Are there tools in git to diagnose the reason for the index's cache being invalidated?
On the topic of Unix permissions -- as far as I can tell, they ARE in fact working, because I've created a UserMapping file that tells NTFS-3G how to map between NTFS/Windows user UUIDs and Linux user IDs. See NTFS-3G's github page (https://github.com/tuxera/ntfs-3g).
On 8/30/24 03:47, brian m. carlson wrote:
Show 40 quoted lines
> On 2024-08-29 at 20:43:40, Roman Sandu wrote: >> 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