diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-12-17 19:43:07 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-03 14:08:30 -0800 |
commit | eb9cb55b944796374402ab4e2639300dc9b0b409 (patch) | |
tree | f240f3713f75d196a320b19f3ace7c570fec6cd4 /wt-status.c | |
parent | afe069d16618190a6f7e84ef8451970e274aedb4 (diff) | |
download | git-eb9cb55b944796374402ab4e2639300dc9b0b409.tar.gz |
Convert ce_path_match() to use struct pathspec
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 'wt-status.c')
-rw-r--r-- | wt-status.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index 1ea330ed17..a82b11d341 100644 --- a/wt-status.c +++ b/wt-status.c @@ -354,14 +354,16 @@ static void wt_status_collect_changes_index(struct wt_status *s) static void wt_status_collect_changes_initial(struct wt_status *s) { + struct pathspec pathspec; int i; + init_pathspec(&pathspec, s->pathspec); for (i = 0; i < active_nr; i++) { struct string_list_item *it; struct wt_status_change_data *d; struct cache_entry *ce = active_cache[i]; - if (!ce_path_match(ce, s->pathspec)) + if (!ce_path_match(ce, &pathspec)) continue; it = string_list_insert(&s->change, ce->name); d = it->util; @@ -376,6 +378,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s) else d->index_status = DIFF_STATUS_ADDED; } + free_pathspec(&pathspec); } static void wt_status_collect_untracked(struct wt_status *s) |