Prevent git_tree_walk 'skip entry' callback return code from leaking through as the return value of git_tree_walk

This commit is contained in:
wilke 2013-09-13 21:21:33 +02:00
parent 25803c632d
commit 4e01e3029b

View File

@ -881,8 +881,10 @@ static int tree_walk(
git_vector_foreach(&tree->entries, i, entry) { git_vector_foreach(&tree->entries, i, entry) {
if (preorder) { if (preorder) {
error = callback(path->ptr, entry, payload); error = callback(path->ptr, entry, payload);
if (error > 0) if (error > 0) {
error = 0;
continue; continue;
}
if (error < 0) { if (error < 0) {
giterr_clear(); giterr_clear();
return GIT_EUSER; return GIT_EUSER;