git-commit: make sure we protect against races.