libgit2/libgit2 — pull request #843 by arrbee (2012-07-26 23:17:09+00:00)
Title: Fix git_tree_walk to return user error

This makes sure that an error code returned by the callback function of `git_tree_walk` will stop the iteration and get propagated back to the caller verbatim. This makes it easier to write code that exits out of the middle of a `git_tree_walk` when a particular item is found and wants to signal the calling function.

Also, this adds a minor helper function `git_tree_entry_byoid` that searches a `git_tree` for an entry with the given OID. This isn't a fast function (it has to do a linear search), but it's easier than writing the loop yourself as an external user of the library.