This bug seems to be somewhat reproducible:
- Set up ~/annex using webapp, keep empty.
- Add another local repo, eg /tmp/annex, and combine the 2 repositories.
Now files written to ~/annex should quickly appear in /tmp/annex, and vice-versa. However, this seems not to happen at first. There's a pause for some reason until changes start propigating. Apparently a push from the repo that got the file to the other repo doesn't happen. After this pause, syncing of changes starts happening quickly, as expected.
--Joey
It may be that git is not overwriting the file with its new content, but is unlinking it and then writing the new content. If so, that could explain the assistant's behavior, since it could notice the file has been deleted, and might commit that before it notices it's been added back.
I tried stracing git checkout, and it indeed does unlink a modified file then it opens the file for write and writes out the new content. Kind of surprising it's not more atomic.
The nature of the assistant is that it's never going to be guaranteed to always make commits that make logical sense in the same way that manually committing will. It might be possible to improve this by having it delay committing removals for some period of time.