1 Oct 2008 01:13
[PATCH] git grep: Add "-Z/--null" option as in GNU's grep.
Raphael Zimmerer <killekulla <at> rdrz.de>
2008-09-30 23:13:10 GMT
2008-09-30 23:13:10 GMT
Here's a trivial patch that adds "-Z" and "--null" options to "git grep" equal to GNU's grep. So things like 'git grep -l -Z "$FOO" | xargs -0 sed -i "s/$FOO/$BOO/"' are more comfortable. Signed-off-by: Raphael Zimmerer <killekulla <at> rdrz.de> --- Documentation/git-grep.txt | 6 ++++++ builtin-grep.c | 7 +++++++ grep.c | 14 +++++++++++--- grep.h | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index fa4d133..9317377 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt <at> <at> -15,6 +15,7 <at> <at> 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> <at> <at> -94,6 +95,11 <at> <at> OPTIONS For better compatibility with 'git-diff', --name-only is a synonym for --files-with-matches. +-Z::(Continue reading)

RSS Feed