Here is version 4 of the patch. "revert-buffer-in-progress-p" flag is set in "auto-revert-handler", according to Michael's idea and then checked in "vc-git-command", according to Dmitry's idea. I have tested the patch, it works.