author | Junio C Hamano <gitster@pobox.com> | |
Tue, 27 Sep 2011 20:43:12 +0000 (13:43 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Oct 2011 01:33:45 +0000 (18:33 -0700) | ||
commit | 0a93fb8a9cc6fa1bf7dba6b498cba3f57f5017a1 | |
tree | 50daede8ecb40d0cff0c0968cd9d3337b8d520b3 | tree | snapshot |
parent | a9e643668aa932d93528fffa573a13a28eb54556 | commit | diff |
grep: teach --untracked and --exclude-standard options
In a working tree of a git managed repository, "grep --untracked" would
find the specified patterns from files in untracked files in addition to
its usual behaviour of finding them in the tracked files.
By default, when working with "--no-index" option, "grep" does not pay
attention to .gitignore mechanism. "grep --no-index --exclude-standard"
can be used to tell the command to use .gitignore and stop reporting hits
from files that would be ignored. Also, when working without "--no-index",
"grep" honors .gitignore mechanism, and "grep --no-exclude-standard" can
be used to tell the command to include hits from files that are ignored.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In a working tree of a git managed repository, "grep --untracked" would
find the specified patterns from files in untracked files in addition to
its usual behaviour of finding them in the tracked files.
By default, when working with "--no-index" option, "grep" does not pay
attention to .gitignore mechanism. "grep --no-index --exclude-standard"
can be used to tell the command to use .gitignore and stop reporting hits
from files that would be ignored. Also, when working without "--no-index",
"grep" honors .gitignore mechanism, and "grep --no-exclude-standard" can
be used to tell the command to include hits from files that are ignored.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-grep.txt | diff | blob | history | |
builtin-grep.c | diff | blob | history | |
t/t7002-grep.sh | diff | blob | history |