aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorRaphael Zimmerer <killekulla@rdrz.de>2008-10-01 18:11:15 +0200
committerShawn O. Pearce <spearce@spearce.org>2008-10-01 09:14:54 -0700
commit83caecca2f0805d440099d19011fdedc2b3467a5 (patch)
treefd5ba5878c5058991a7e9e3bde78a8908221e500 /Documentation/git-grep.txt
parent5e22e21769454857e00bc55be1f2eef8d873ba72 (diff)
downloadgit-83caecca2f0805d440099d19011fdedc2b3467a5.tar.gz
git grep: Add "-z/--null" option as in GNU's grep.
Here's a trivial patch that adds "-z" and "--null" options to "git grep". It was discussed on the mailing-list that git's "-z" convention should be used instead of GNU grep's "-Z". So things like 'git grep -l -z "$FOO" | xargs -0 sed -i "s/$FOO/$BOO/"' do work now. Signed-off-by: Raphael Zimmerer <killekulla@rdrz.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index fa4d133c1b..553da6cbb1 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -15,6 +15,7 @@ SYNOPSIS
[-E | --extended-regexp] [-G | --basic-regexp]
[-F | --fixed-strings] [-n]
[-l | --files-with-matches] [-L | --files-without-match]
+ [-z | --null]
[-c | --count] [--all-match]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-f <file>] [-e] <pattern>
@@ -94,6 +95,11 @@ OPTIONS
For better compatibility with 'git-diff', --name-only is a
synonym for --files-with-matches.
+-z::
+--null::
+ Output \0 instead of the character that normally follows a
+ file name.
+
-c::
--count::
Instead of showing every matched line, show the number of