git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] correct documentation for git grep

From
MLMatthias Lederhofer <matled@gmx.net>
Date
Jun 26, 2006, 00:06 UTC
Message-ID
<E1Fuecp-0004iI-RG@moooo.ath.cx>
In-Reply-To
<E1FueCE-0003W3-4Q@moooo.ath.cx>
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
---
The 'or' as logic or should be marked in the text. I did
that in the patch with --and too so if this is accepted the
documentation should be consistent. Sorry for the noise.
 Documentation/git-grep.txt |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 7b810df..ebfe51b 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -16,7 +16,7 @@ SYNOPSIS
 	   [-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> [-e <pattern> [..]]
 	   [<tree>...]
 	   [--] [<path>...]
 
@@ -71,6 +71,12 @@ OPTIONS
 -f <file>::
 	Read patterns from <file>, one per line.
 
+-e::
+	The next parameter is a pattern. This option has to be
+	used for patterns starting with - and should be used in
+	scripts passing user input to grep. You can specify multiple
+	patterns which will be combined by 'or'.
+
 `<tree>...`::
 	Search blobs in the trees for specified patterns.
 
-- 
1.4.1.rc1.g72a4-dirty
Previous: Matthias LederhoferNext: Johannes Schindelin
Message 6 of 32 in “git-grep: allow patterns starting with -”
  1. git-grep: allow patterns starting with -Matthias Lederhofer, Jun 25, 2006
  2. Timo HirvonenJun 25, 2006
  3. correct documentation for git grepMatthias Lederhofer, Jun 25, 2006
  4. Johannes SchindelinJun 25, 2006
  5. correct documentation for git grepMatthias Lederhofer, Jun 25, 2006
  6. correct documentation for git grepMatthias Lederhofer, Jun 26, 2006
  7. Johannes SchindelinJun 26, 2006
  8. git-grep: --and to combine patterns with and instead of orMatthias Lederhofer, Jun 26, 2006
  9. Thomas GlanzmannJun 29, 2006
  10. Junio C HamanoJun 29, 2006
  11. Matthias LederhoferJun 30, 2006
  12. Junio C HamanoJun 30, 2006
  13. Matthias LederhoferJun 30, 2006
  14. Junio C HamanoJun 30, 2006
  15. git-grep: boolean expression on pattern matching.Junio C Hamano, Jun 30, 2006
  16. Jakub NarebskiJun 30, 2006
  17. Junio C HamanoJun 30, 2006
  18. Matthias LederhoferJun 30, 2006
  19. Matthias LederhoferJun 30, 2006
  20. Junio C HamanoJun 30, 2006
  21. Matthias LederhoferJun 30, 2006
  22. Junio C HamanoJun 30, 2006
  23. Jakub NarebskiJun 30, 2006
  24. Matthias LederhoferJun 30, 2006
  25. Junio C HamanoJun 30, 2006
  26. Matthias LederhoferJun 30, 2006
  27. Jakub NarebskiJun 30, 2006
  28. Junio C HamanoJun 30, 2006
  29. Jakub NarebskiJun 30, 2006
  30. Junio C HamanoJun 30, 2006
  31. Andreas EricssonJul 3, 2006
  32. Matthias LederhoferJun 25, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.