You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of times I switch git branches without relaunching/reloading helix. Then upon attempting to write, it informs me that the file has been modified by an external process. The problem is that this gets emitted even if only the file timestamp changes, regardless of whether or not the file contents actually changed.
Instead, if Helix notices a timestamp change then there should be a fallback method, such as a hash of the file contents, to determine whether or not writing needs to be blocked and this message shown. sha1_smol would probably work well enough and is already in the dependency graph, or blake3 would be faster since it leverages mmap and parallelization.
The text was updated successfully, but these errors were encountered:
Yeah hashes to detect false positives would probably be good. IIRC vim does that too. Everywhere we update the timestamp we would update the hash too. (But only check hashes in case of a mismatched timestamp).
It does add quite a bit of extra IO to writing a file but it's probably OK. I would use blake3 for now we want to use a non-crpto hash for this in the future (that is still in development)
A lot of times I switch git branches without relaunching/reloading helix. Then upon attempting to write, it informs me that the file has been modified by an external process. The problem is that this gets emitted even if only the file timestamp changes, regardless of whether or not the file contents actually changed.
Instead, if Helix notices a timestamp change then there should be a fallback method, such as a hash of the file contents, to determine whether or not writing needs to be blocked and this message shown.
sha1_smol
would probably work well enough and is already in the dependency graph, or blake3 would be faster since it leverages mmap and parallelization.The text was updated successfully, but these errors were encountered: