diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-13 14:44:59 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-13 14:44:59 +0900 |
commit | d8df70f2739af78cab6d7f9b942e890da6fbd01d (patch) | |
tree | 516484a8bc55edcc64f5dad63626d932389d4647 /wt-status.c | |
parent | RelNotes: the third batch for 2.16 (diff) | |
parent | status: test ignored modes (diff) | |
download | tgif-d8df70f2739af78cab6d7f9b942e890da6fbd01d.tar.xz |
Merge branch 'jm/status-ignored-files-list'
The set of paths output from "git status --ignored" was tied
closely with its "--untracked=<mode>" option, but now it can be
controlled more flexibly. Most notably, a directory that is
ignored because it is listed to be ignored in the ignore/exclude
mechanism can be handled differently from a directory that ends up
to be ignored only because all files in it are ignored.
* jm/status-ignored-files-list:
status: test ignored modes
status: document options to show matching ignored files
status: report matching ignored and normal untracked
status: add option to show ignored files differently
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c index ed3271c3f3..937a87bbd5 100644 --- a/wt-status.c +++ b/wt-status.c @@ -658,10 +658,15 @@ static void wt_status_collect_untracked(struct wt_status *s) if (s->show_untracked_files != SHOW_ALL_UNTRACKED_FILES) dir.flags |= DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES; - if (s->show_ignored_files) + if (s->show_ignored_mode) { dir.flags |= DIR_SHOW_IGNORED_TOO; - else + + if (s->show_ignored_mode == SHOW_MATCHING_IGNORED) + dir.flags |= DIR_SHOW_IGNORED_TOO_MODE_MATCHING; + } else { dir.untracked = the_index.untracked; + } + setup_standard_excludes(&dir); fill_directory(&dir, &the_index, &s->pathspec); @@ -1619,7 +1624,7 @@ static void wt_longstatus_print(struct wt_status *s) } if (s->show_untracked_files) { wt_longstatus_print_other(s, &s->untracked, _("Untracked files"), "add"); - if (s->show_ignored_files) + if (s->show_ignored_mode) wt_longstatus_print_other(s, &s->ignored, _("Ignored files"), "add -f"); if (advice_status_u_option && 2000 < s->untracked_in_ms) { status_printf_ln(s, GIT_COLOR_NORMAL, "%s", ""); |