Re: [PATCH v2] git grep: Add "-z/--null" option as in GNU's grep.
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 1, 2008, 16:17 UTC
- Message-ID
- <20081001161705.GH21310@spearce.org>
- In-Reply-To
- <1222877475-2699-1-git-send-email-killekulla@rdrz.de>
Raphael Zimmerer <killekulla@rdrz.de> wrote:
Show 11 quoted lines
> diff --git a/builtin-grep.c b/builtin-grep.c
> index 3a51662..2241324 100644
> --- a/builtin-grep.c
> +++ b/builtin-grep.c
> @@ -295,6 +295,9 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
> push_arg("-l");
> if (opt->unmatch_name_only)
> push_arg("-L");
> + if (opt->null_following_name)
> + // in GNU grep git's "-z" translates to "-Z"
> + push_arg("-Z");We use /* */ style comments in Git. I've amended the patch with the simple // -> /* */ translation.
The rest of this change looks good to me. Its queued for next.
-- Shawn.