[[!comment format=mdwn
 username="joey"
 subject="""comment 2"""
 date="2017-10-16T16:25:39Z"
 content="""
It would be good to avoid the window where the file is not present in the
working tree during ingestion, because interupting `git annex add` during
that window causes the file to go missing, with no record of it yet in git.

I tried making the window longer by adding a 10 second sleep, and indeed
interrupting `git annex add` during the window is *bad*. 

Looking at the code, `makeLink` uses `replaceFile` to atomicallty
replace the file with the symlink. But `ingestAdd` for some reason
calls `nukeFile` before `makeLink`. I could not find any good reason
for it to do that. So, I've removed the `nukeFile`, closing the window.

That change also fixed the "file not found" error. But I'm not sure
if it's entirely dealt with the problems raised by this bug report..
"""]]
