On 2024-08-30 at 19:25:56, Roman Sandu wrote: > The stat output for a random file in the root of the repository is as > follows: > ``` > File: <CENSORED> > Size: 91876 Blocks: 184 IO Block: 4096 regular file > Device: 259,2 Inode: 4630629 Links: 1 > Access: (0664/-rw-rw-r--) Uid: ( 1000/romasandu) Gid: ( 1000/romasandu) > Access: 2024-08-29 17:41:04.855126300 +0300 > Modify: 2024-08-29 17:41:04.855609000 +0300 > Change: 2024-08-29 17:41:04.855609000 +0300 > Birth: - > ``` > Maybe lack of a birth stat is what drives git crazy? That doesn't exist in POSIX, so it isn't used in Git. I looked at the Ubuntu git package and it doesn't use `USE_NSEC`, so your lack of nanosecond precision in timestamps probably isn't the problem here. You may want to try using a utility like https://github.com/shogo82148/git-dump-index to dump the index and find out what might have changed. You can use `stat -c` to write the data for the actual files in the same format, and then run `diff` on the two to find out where they disagree. Or, perhaps you can just eyeball it, in case there's something obvious (like a `uid` difference). Or, you could try instrumenting `match_stat_data` or `stat_validity_check` in `statinfo.c` and printing the data that's changed. You might also try disabling untracked cache and see if that fixes the problem. It might be that there _is_ a bug in that the untracked cache information isn't correctly refreshed when it was originally written on a different platform. It's known that Windows writes different information into the index than Unix systems and perhaps that information doesn't get refreshed properly. One other thought: Windows stores symlinks with a different size than most Unix systems. Windows tends to give them a full block size, whereas Unix gives them a size of their length in bytes. That definitely breaks using symlinks in a repository across Windows and WSL. I don't know if that's what's going on here, but of course it could be related. -- brian m. carlson (they/them or he/him) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature