summaryrefslogtreecommitdiff
path: root/tree.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-03-25 16:34:19 +0700
committerJunio C Hamano <gitster@pobox.com>2011-03-25 09:20:33 -0700
commitf0096c06bcdeb7aa6ae8a749ddc9d6d4a2c381d1 (patch)
treeb5b28251c9e48186b9e6168cbfefe4ace0f57602 /tree.h
parentffd31f661d5c5dddc091750ca86cfaa5d9d04b38 (diff)
downloadgit-f0096c06bcdeb7aa6ae8a749ddc9d6d4a2c381d1.tar.gz
Convert read_tree{,_recursive} to support struct pathspec
This patch changes behavior of the two functions. Previously it does prefix matching only. Now it can also do wildcard matching. All callers are updated. Some gain wildcard matching (archive, checkout), others reset pathspec_item.has_wildcard to retain old behavior (ls-files, ls-tree as they are plumbing). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree.h')
-rw-r--r--tree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tree.h b/tree.h
index 2ff01a4f83..69bcb5e0ec 100644
--- a/tree.h
+++ b/tree.h
@@ -25,9 +25,9 @@ typedef int (*read_tree_fn_t)(const unsigned char *, const char *, int, const ch
extern int read_tree_recursive(struct tree *tree,
const char *base, int baselen,
- int stage, const char **match,
+ int stage, struct pathspec *pathspec,
read_tree_fn_t fn, void *context);
-extern int read_tree(struct tree *tree, int stage, const char **paths);
+extern int read_tree(struct tree *tree, int stage, struct pathspec *pathspec);
#endif /* TREE_H */