summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-12-17 12:43:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-02-03 22:08:30 (GMT)
commiteb9cb55b944796374402ab4e2639300dc9b0b409 (patch)
treef240f3713f75d196a320b19f3ace7c570fec6cd4 /wt-status.c
parentafe069d16618190a6f7e84ef8451970e274aedb4 (diff)
downloadgit-eb9cb55b944796374402ab4e2639300dc9b0b409.zip
git-eb9cb55b944796374402ab4e2639300dc9b0b409.tar.gz
git-eb9cb55b944796374402ab4e2639300dc9b0b409.tar.bz2
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c
index 1ea330e..a82b11d 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)