4 ms·
Does not caching this really help, though? What happens when the .gitignore above you changes while you are in the midst of scanning a subdirectory? Is that n
by bsder 5y ago
Does not caching this really help, though?
What happens when the .gitignore above you changes while you are in the midst of scanning a subdirectory? Is that not the same problem?
The problem is that git operations aren't transactional with respect to the filesystem, no? Sure, the window of uncertainty changes, but it's never zero.
- beagle3 5y agoBut that's an inherent problem with a non-transactional file system. If you remove .gitignore 1 microsecond before git open()s it, it's gone. If you remove .gitignore 1 microsecond after git open()s it (even before it has a chance to read it), unix file system semantics mean you still get the contents. There is always a race condition, you can play with the specifics, but cannot avoid it when multiple files referring to each other are edited independently.