Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2012-05-20 18:33:07 +0400
committerJunio C Hamano <gitster@pobox.com>2012-05-21 02:25:46 +0400
commit526a858a99ace6698823740374edc3e35b87901a (patch)
tree7e8e8385829962ef29f0024e8d1ef399e80388e2 /Documentation/git-grep.txt
parent2b3873ff34ff937dad729407da4308be6a5bcd66 (diff)
grep: support newline separated pattern list
Currently, patterns that contain newline characters don't match anything when given to git grep. Regular grep(1) interprets patterns as lists of newline separated search strings instead. Implement this functionality by creating and inserting extra grep_pat structures for patterns consisting of multiple lines when appending to the pattern lists. For simplicity, all pattern strings are duplicated. The original pattern is truncated in place to make it contain only the first line. Requested-by: Torne (Richard Coles) <torne@google.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index e150c77cff..c3306f3a3b 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -29,7 +29,9 @@ SYNOPSIS
DESCRIPTION
-----------
Look for specified patterns in the tracked files in the work tree, blobs
-registered in the index file, or blobs in given tree objects.
+registered in the index file, or blobs in given tree objects. Patterns
+are lists of one or more search expressions separated by newline
+characters. An empty string as search expression matches all lines.
CONFIGURATION