Merge pull request #1097 from nulltoken/topic/head_tree_error Make `git_repository_head_tree()` return error codes