Skip to content

Commit b70cec0

Browse files
committed
Merge branch 'ws/grep-quiet-no-pager' into maint
Even though "git grep --quiet" is run merely to ask for the exit status, we spawned the pager regardless. Stop doing that. * ws/grep-quiet-no-pager: grep: fix "--quiet" overwriting current output
2 parents a5d3154 + c2048f0 commit b70cec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
885885
}
886886
}
887887

888-
if (!show_in_pager)
888+
if (!show_in_pager && !opt.status_only)
889889
setup_pager();
890890

891891
if (!use_index && (untracked || cached))

0 commit comments

Comments
 (0)