summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5b26b1)
raw | patch | inline | side by side (parent: f5b26b1)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 10 Apr 2010 07:11:53 +0000 (00:11 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 10 Apr 2010 07:43:59 +0000 (00:43 -0700) |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c | patch | blob | history | |
wt-status.h | patch | blob | history |
diff --git a/wt-status.c b/wt-status.c
index c88159ad068ccde1c8057d91babc567174f8394d..f13c7da64f0defef24507e041cfa1e5df682b9cc 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
s->index_file = get_index_file();
s->change.strdup_strings = 1;
s->untracked.strdup_strings = 1;
+ s->ignored.strdup_strings = 1;
}
static void wt_status_print_unmerged_header(struct wt_status *s)
free(ent);
}
+ if (s->show_ignored_files) {
+ dir.nr = 0;
+ dir.flags = DIR_SHOW_IGNORED | DIR_SHOW_OTHER_DIRECTORIES;
+ fill_directory(&dir, s->pathspec);
+ for (i = 0; i < dir.nr; i++) {
+ struct dir_entry *ent = dir.entries[i];
+ if (!cache_name_is_other(ent->name, ent->len))
+ continue;
+ if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
+ continue;
+ string_list_insert(ent->name, &s->ignored);
+ free(ent);
+ }
+ }
+
free(dir.entries);
}
diff --git a/wt-status.h b/wt-status.h
index 2c49f465f84fd547c853e967c385c5c106f10e16..1093e65ae00e60c171c740d06628705cfcfb68c2 100644 (file)
--- a/wt-status.h
+++ b/wt-status.h
int use_color;
int relative_paths;
int submodule_summary;
+ int show_ignored_files;
enum untracked_status_type show_untracked_files;
char color_palette[WT_STATUS_UNMERGED+1][COLOR_MAXLEN];
const char *prefix;
struct string_list change;
struct string_list untracked;
+ struct string_list ignored;
};
void wt_status_prepare(struct wt_status *s);