Commit 53ae1235 by Carlos Martín Nieto

tree: bring back the documented behaviour for a walk

However, there should be a way to cancel the walk and another to skip
the entry.
parent c9d78bde
...@@ -787,10 +787,8 @@ static int tree_walk( ...@@ -787,10 +787,8 @@ static int tree_walk(
for (i = 0; i < tree->entries.length; ++i) { for (i = 0; i < tree->entries.length; ++i) {
git_tree_entry *entry = tree->entries.contents[i]; git_tree_entry *entry = tree->entries.contents[i];
if (preorder && callback(path->ptr, entry, payload)) { if (preorder && callback(path->ptr, entry, payload) < 0)
error = GIT_EUSER; continue
break;
}
if (git_tree_entry__is_tree(entry)) { if (git_tree_entry__is_tree(entry)) {
git_tree *subtree; git_tree *subtree;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment