summaryrefslogtreecommitdiff
path: root/Documentation/git-check-ignore.txt
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2013-04-11 12:05:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-11 18:01:58 (GMT)
commitae3caf4c912429c8e9755f2e10d2f0a7f6279c36 (patch)
tree9dbc8d724521cf5903d6395c73c377509f11e13a /Documentation/git-check-ignore.txt
parenteef39f8124ba6045bdc1ae6e665d3d65e28385ab (diff)
downloadgit-ae3caf4c912429c8e9755f2e10d2f0a7f6279c36.zip
git-ae3caf4c912429c8e9755f2e10d2f0a7f6279c36.tar.gz
git-ae3caf4c912429c8e9755f2e10d2f0a7f6279c36.tar.bz2
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.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt
index 854e4d0..7e3cabc 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
-----------