From: Junio C Hamano Date: Thu, 3 Aug 2006 00:29:36 +0000 (+0000) Subject: Autogenerated HTML docs for v1.4.2-rc2-gfba0cb X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0044202b4bbf691ffa5a2c31a8e0064a3561beeb;p=git.git Autogenerated HTML docs for v1.4.2-rc2-gfba0cb --- diff --git a/git-grep.html b/git-grep.html index f9f29d5ee..386db3b00 100644 --- a/git-grep.html +++ b/git-grep.html @@ -280,7 +280,7 @@ git-grep(1) Manual Page [-n] [-l | --files-with-matches] [-L | --files-without-match] [-c | --count] [-A <post-context>] [-B <pre-context>] [-C <context>] - [-f <file>] [-e] <pattern> + [-f <file>] [-e] <pattern> [--and|--or|--not|(|)|-e <pattern>…] [<tree>…] [--] [<path>…] @@ -397,7 +397,19 @@ registered in the index file, or given tree objects.

The next parameter is the pattern. This option has to be used for patterns starting with - and should be used in - scripts passing user input to grep. + scripts passing user input to grep. Multiple patterns are + combined by or. +

+ +
+--and | --or | --not | ( | ) +
+
+

+ Specify how multiple patterns are combined using boolean + expressions. --or is the default operator. --and has + higher precedence than --or. -e has to be used for all + patterns.

@@ -409,7 +421,7 @@ registered in the index file, or given tree objects.

--- +--

@@ -419,6 +431,20 @@ registered in the index file, or given tree objects.

+

Example

+
+
+
+git grep -e '#define' --and \( -e MAX_PATH -e PATH_MAX \) +
+
+

+ Looks for a line that has #define and either MAX_PATH or + PATH_MAX. +

+
+
+

Author

Originally written by Linus Torvalds <torvalds@osdl.org>, later @@ -434,7 +460,7 @@ revamped by Junio C Hamano.

diff --git a/git-grep.txt b/git-grep.txt index 62a8e7f22..dc7683383 100644 --- a/git-grep.txt +++ b/git-grep.txt @@ -16,7 +16,7 @@ SYNOPSIS [-n] [-l | --files-with-matches] [-L | --files-without-match] [-c | --count] [-A ] [-B ] [-C ] - [-f ] [-e] + [-f ] [-e] [--and|--or|--not|(|)|-e ...] [...] [--] [...] @@ -74,16 +74,30 @@ OPTIONS -e:: The next parameter is the pattern. This option has to be used for patterns starting with - and should be used in - scripts passing user input to grep. + scripts passing user input to grep. Multiple patterns are + combined by 'or'. + +--and | --or | --not | ( | ):: + Specify how multiple patterns are combined using boolean + expressions. `--or` is the default operator. `--and` has + higher precedence than `--or`. `-e` has to be used for all + patterns. `...`:: Search blobs in the trees for specified patterns. -`--`:: +\--:: Signals the end of options; the rest of the parameters are limiters. +Example +------- + +git grep -e \'#define\' --and \( -e MAX_PATH -e PATH_MAX \):: + Looks for a line that has `#define` and either `MAX_PATH` or + `PATH_MAX`. + Author ------ Originally written by Linus Torvalds , later