Improve error handling in GitRev