status: document options to show matching ignored files

Signed-off-by: Jameson Miller <jamill@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jameson Miller committed Oct 30, 2017 at 13:21 UTC 1b2bc3912a183c88ccd70050a359a2b6bbacca7d
2 files changed +43 -5
Documentation/git-status.txt
+20 -1
@@ -97,8 +97,27 @@ configuration variable documented in linkgit:git-config[1].
97 (and suppresses the output of submodule summaries when the config option
98 `status.submoduleSummary` is set).
99
100 ---ignored::
100 +--ignored[=<mode>]::
101 Show ignored files as well.
102 ++
103 +The mode parameter is used to specify the handling of ignored files.
104 +It is optional: it defaults to 'traditional'.
105 ++
106 +The possible options are:
107 ++
108 + - 'traditional' - Shows ignored files and directories, unless
109 + --untracked-files=all is specifed, in which case
110 + individual files in ignored directories are
111 + displayed.
112 + - 'no' - Show no ignored files.
113 + - 'matching' - Shows ignored files and directories matching an
114 + ignore pattern.
115 ++
116 +When 'matching' mode is specified, paths that explicity match an
117 +ignored pattern are shown. If a directory matches an ignore pattern,
118 +then it is shown, but not paths contained in the ignored directory. If
119 +a directory does not match an ignore pattern, but all contents are
120 +ignored, then the directory is not shown, but all contents are shown.
121
122 -z::
123 Terminate entries with NUL, instead of LF. This implies
Documentation/technical/api-directory-listing.txt
+23 -4
@@ -22,16 +22,20 @@ The notable options are:
22
23 `flags`::
24
25 - A bit-field of options (the `*IGNORED*` flags are mutually exclusive):
25 + A bit-field of options:
26
27 `DIR_SHOW_IGNORED`:::
28
29 - Return just ignored files in `entries[]`, not untracked files.
29 + Return just ignored files in `entries[]`, not untracked
30 + files. This flag is mutually exclusive with
31 + `DIR_SHOW_IGNORED_TOO`.
32
33 `DIR_SHOW_IGNORED_TOO`:::
34
33 - Similar to `DIR_SHOW_IGNORED`, but return ignored files in `ignored[]`
34 - in addition to untracked files in `entries[]`.
35 + Similar to `DIR_SHOW_IGNORED`, but return ignored files in
36 + `ignored[]` in addition to untracked files in
37 + `entries[]`. This flag is mutually exclusive with
38 + `DIR_SHOW_IGNORED`.
39
40 `DIR_KEEP_UNTRACKED_CONTENTS`:::
41
@@ -39,6 +43,21 @@ The notable options are:
43 untracked contents of untracked directories are also returned in
44 `entries[]`.
45
46 +`DIR_SHOW_IGNORED_TOO_MODE_MATCHING`:::
47 +
48 + Only has meaning if `DIR_SHOW_IGNORED_TOO` is also set; if
49 + this is set, returns ignored files and directories that match
50 + an exclude pattern. If a directory matches an exclude pattern,
51 + then the directory is returned and the contained paths are
52 + not. A directory that does not match an exclude pattern will
53 + not be returned even if all of its contents are ignored. In
54 + this case, the contents are returned as individual entries.
55 ++
56 +If this is set, files and directories that explicity match an ignore
57 +pattern are reported. Implicity ignored directories (directories that
58 +do not match an ignore pattern, but whose contents are all ignored)
59 +are not reported, instead all of the contents are reported.
60 +
61 `DIR_COLLECT_IGNORED`:::
62
63 Special mode for git-add. Return ignored files in `ignored[]` and