irw-inotify [DEBUG] inotify: /tmp/repo/.git/refs/heads/master.lock [CREATE]
Fatal error: exception (Sys_error
"/tmp/repo/.git/refs/heads/master.lock: No such file or directory")
I suspect this is due to:
let read_file ~prefix f =
if not (Sys.file_exists f) || Sys.is_directory f then None
Changing it to if not (Sys.file_exists f) || (Unix.sleepf 0.1; Sys.is_directory f) then None makes it crash reliably.
BTW, a couple of other things I noticed while tracking this down:
hook.ml uses a log source of irw-polling, but seems to be used with all backends.
inotify.ml's iter function looks non-tail-recursive (calls itself inside a catch).
e.g.
I suspect this is due to:
Changing it to
if not (Sys.file_exists f) || (Unix.sleepf 0.1; Sys.is_directory f) then None
makes it crash reliably.BTW, a couple of other things I noticed while tracking this down:
hook.ml
uses a log source ofirw-polling
, but seems to be used with all backends.inotify.ml
'siter
function looks non-tail-recursive (calls itself inside acatch
).