diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-05 19:44:06 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-09 00:43:47 -0800 |
commit | 5803c6f8a2faf8cfbbd046d9ebd682b82bb2b086 (patch) | |
tree | 4f586a9a7d7735115167257b023ac9e7fc01869d /tree-walk.h | |
parent | 40d934df72eaf244c826d5c26da0896ce7185cb6 (diff) | |
download | git-5803c6f8a2faf8cfbbd046d9ebd682b82bb2b086.tar.gz |
Add return value to 'traverse_tree()' callback
This allows the callback to return an error value, but it can also
specify which of the tree entries that it actually used up by returning
a positive mask value.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.h')
-rw-r--r-- | tree-walk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tree-walk.h b/tree-walk.h index 7c4ae646be..c123cfeef4 100644 --- a/tree-walk.h +++ b/tree-walk.h @@ -34,8 +34,8 @@ int tree_entry(struct tree_desc *, struct name_entry *); void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1); struct traverse_info; -typedef void (*traverse_callback_t)(int n, unsigned long mask, struct name_entry *entry, struct traverse_info *); -void traverse_trees(int n, struct tree_desc *t, struct traverse_info *info); +typedef int (*traverse_callback_t)(int n, unsigned long mask, struct name_entry *entry, struct traverse_info *); +int traverse_trees(int n, struct tree_desc *t, struct traverse_info *info); struct traverse_info { struct traverse_info *prev; |