libgit2/objective-git — pull request #138 by peterkelly (2013-03-06 14:14:54+00:00)
Title: Fix GTIndex entryWithName:

Previously, GTIndex's entryWithName: method treated the result of
git_index_find() as the position of the entry in the index. However,
this is wrong - the returned value is an error code (or zero for
success). So every time you called this method with any name, it would
return either zero or a negative error code, and the subsequent call to
git_index_get_byindex() would return the first entry.

This change modifies the behaviour to pass in a pointer to a position
variable of type size_t in which the position is stored by
git_index_find() on success, and this value is used to look up the index
entry. On error, the method returns nil.

I have also added one new method, entryWithName:error:, which allows the
caller to receive details of the lookup error, in case of failure.