]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/check-ignore.c
check-ignore: add -n / --non-matching option
authorAdam Spiers <git@adamspiers.org>
Thu, 11 Apr 2013 12:05:10 +0000 (13:05 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Apr 2013 18:01:58 +0000 (11:01 -0700)
commitae3caf4c912429c8e9755f2e10d2f0a7f6279c36
tree9dbc8d724521cf5903d6395c73c377509f11e13a
parenteef39f8124ba6045bdc1ae6e665d3d65e28385ab
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>
Documentation/git-check-ignore.txt
builtin/check-ignore.c
t/t0008-ignores.sh