Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-03-25 12:34:19 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-25 19:20:33 +0300
commitf0096c06bcdeb7aa6ae8a749ddc9d6d4a2c381d1 (patch)
treeb5b28251c9e48186b9e6168cbfefe4ace0f57602 /merge-recursive.c
parentffd31f661d5c5dddc091750ca86cfaa5d9d04b38 (diff)
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 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 16c2dbeab9..0645138ae5 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -288,7 +288,9 @@ static int save_files_dirs(const unsigned char *sha1,
static int get_files_dirs(struct merge_options *o, struct tree *tree)
{
int n;
- if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs, o))
+ struct pathspec match_all;
+ init_pathspec(&match_all, NULL);
+ if (read_tree_recursive(tree, "", 0, 0, &match_all, save_files_dirs, o))
return 0;
n = o->current_file_set.nr + o->current_directory_set.nr;
return n;