Return the last git_error object that was generated for the current thread or NULL if no error has occurred.
git_error
A git_error object.