mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 15:52:02 +00:00
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:
parent
25803c632d
commit
4e01e3029b
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user