Re: [PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-17 Thread Junio C Hamano
Anthony Sottile writes: > The handling of `status_only` no longer interferes with the handling of > `unmatch_name_only`. `--quiet` no longer affects the exit code when using > `-L`/`--files-without-match`. > > Signed-off-by: Anthony Sottile > --- Thanks, Will queue. > grep.c | 2 +-

[PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-17 Thread Anthony Sottile
The handling of `status_only` no longer interferes with the handling of `unmatch_name_only`. `--quiet` no longer affects the exit code when using `-L`/`--files-without-match`. Signed-off-by: Anthony Sottile --- grep.c | 2 +- t/t7810-grep.sh | 5 + 2 files changed, 6 insertions(+),

Re: [PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-15 Thread Anthony Sottile
Sounds good, I'll wait. I've also created a mailing list entry on the gnu grep mailing list as I believe the current exit status for --files-without-match is inconsistent: http://lists.gnu.org/archive/html/bug-grep/2017-08/msg00010.html Anthony On Tue, Aug 15, 2017 at 3:24 PM, Junio C Hamano w

Re: [PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-15 Thread Junio C Hamano
Anthony Sottile writes: > Ah yes, I didn't intend to include the first hunk (forgot to amend it > out when formatting the patch). > > I think git's exit codes for -L actually make more sense than the GNU > exit codes (especially when comparing with `grep` vs `grep -v`) -- > that is, produce `0` w

Re: [PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-15 Thread Anthony Sottile
Ah yes, I didn't intend to include the first hunk (forgot to amend it out when formatting the patch). I think git's exit codes for -L actually make more sense than the GNU exit codes (especially when comparing with `grep` vs `grep -v`) -- that is, produce `0` when the search is successful (produci

Re: [PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-15 Thread Junio C Hamano
Anthony Sottile writes: > The handling of `status_only` no longer interferes with the handling of > `unmatch_name_only`. `--quiet` no longer affects the exit code when using > `-L`/`--files-without-match`. I agree with the above statement of yours that --quiet should not affect what the exit st

[PATCH/RFC] git-grep: correct exit code with --quiet and -L

2017-08-15 Thread Anthony Sottile
The handling of `status_only` no longer interferes with the handling of `unmatch_name_only`. `--quiet` no longer affects the exit code when using `-L`/`--files-without-match`. Signed-off-by: Anthony Sottile --- grep.c | 9 + t/t7810-grep.sh | 5 + 2 files changed, 10 insert