git_repository_state() does not return an error code

Should not be checking the return code with ```git_check_error()```