summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-23 21:13:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-23 21:13:12 (GMT)
commit85c81a74e24fd83bbe7a75aa4ce6a5b3dfa1b884 (patch)
treec295552653e67bf20c475d955d78756a82c19f23 /grep.c
parentc3e034f0f0753126494285d1098e1084ec05d2c4 (diff)
parente1f68c66d575e09f325f3eda9ced1b2f4ef4b4f0 (diff)
downloadgit-85c81a74e24fd83bbe7a75aa4ce6a5b3dfa1b884.zip
git-85c81a74e24fd83bbe7a75aa4ce6a5b3dfa1b884.tar.gz
git-85c81a74e24fd83bbe7a75aa4ce6a5b3dfa1b884.tar.bz2
Merge branch 'as/grep-quiet-no-match-exit-code-fix'
"git grep -L" and "git grep --quiet -L" reported different exit codes; this has been corrected. * as/grep-quiet-no-match-exit-code-fix: git-grep: correct exit code with --quiet and -L
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/grep.c b/grep.c
index 45acd33..ce6a48e 100644
--- a/grep.c
+++ b/grep.c
@@ -1821,7 +1821,7 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle
return 0;
if (opt->status_only)
- return 0;
+ return opt->unmatch_name_only;
if (opt->unmatch_name_only) {
/* We did not see any hit, so we want to show this */
show_name(opt, gs->name);