aboutsummaryrefslogtreecommitdiffstats
path: root/path-walk.h
diff options
context:
space:
mode:
Diffstat (limited to 'path-walk.h')
-rw-r--r--path-walk.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/path-walk.h b/path-walk.h
index 7cb3538cd8..2cafc71e15 100644
--- a/path-walk.h
+++ b/path-walk.h
@@ -31,9 +31,21 @@ struct path_walk_info {
*/
path_fn path_fn;
void *path_fn_data;
+
+ /**
+ * Initialize which object types the path_fn should be called on. This
+ * could also limit the walk to skip blobs if not set.
+ */
+ int commits;
+ int trees;
+ int blobs;
};
-#define PATH_WALK_INFO_INIT { 0 }
+#define PATH_WALK_INFO_INIT { \
+ .blobs = 1, \
+ .trees = 1, \
+ .commits = 1, \
+}
void path_walk_info_init(struct path_walk_info *info);
void path_walk_info_clear(struct path_walk_info *info);