diff options
author | Adam Spiers <git@adamspiers.org> | 2013-04-11 14:05:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-11 20:01:58 +0200 |
commit | ae3caf4c912429c8e9755f2e10d2f0a7f6279c36 (patch) | |
tree | 9dbc8d724521cf5903d6395c73c377509f11e13a /Documentation/git-check-ignore.txt | |
parent | t0008: remove duplicated test fixture data (diff) | |
download | git-ae3caf4c912429c8e9755f2e10d2f0a7f6279c36.tar.xz git-ae3caf4c912429c8e9755f2e10d2f0a7f6279c36.zip |
check-ignore: add -n / --non-matching option
If `-n` or `--non-matching` are specified, non-matching pathnames will
also be output, in which case all fields in each output record except
for <pathname> will be empty. This can be useful when running
check-ignore as a background process, so that files can be
incrementally streamed to STDIN, and for each of these files, STDOUT
will indicate whether that file matched a pattern or not. (Without
this option, it would be impossible to tell whether the absence of
output for a given file meant that it didn't match any pattern, or
that the result simply hadn't been flushed to STDOUT yet.)
Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-check-ignore.txt')
-rw-r--r-- | Documentation/git-check-ignore.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt index 854e4d0c42..7e3cabc9dd 100644 --- a/Documentation/git-check-ignore.txt +++ b/Documentation/git-check-ignore.txt @@ -39,6 +39,12 @@ OPTIONS below). If `--stdin` is also given, input paths are separated with a NUL character instead of a linefeed character. +-n, --non-matching:: + Show given paths which don't match any pattern. This only + makes sense when `--verbose` is enabled, otherwise it would + not be possible to distinguish between paths which match a + pattern and those which don't. + OUTPUT ------ @@ -65,6 +71,15 @@ are also used instead of colons and hard tabs: <source> <NULL> <linenum> <NULL> <pattern> <NULL> <pathname> <NULL> +If `-n` or `--non-matching` are specified, non-matching pathnames will +also be output, in which case all fields in each output record except +for <pathname> will be empty. This can be useful when running +non-interactively, so that files can be incrementally streamed to +STDIN of a long-running check-ignore process, and for each of these +files, STDOUT will indicate whether that file matched a pattern or +not. (Without this option, it would be impossible to tell whether the +absence of output for a given file meant that it didn't match any +pattern, or that the output hadn't been generated yet.) EXIT STATUS ----------- |