Skip to content

Commit

Permalink
Merge branch 'ws/grep-quiet-no-pager' into maint
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Mar 28, 2015
2 parents a5d3154 + c2048f0 commit b70cec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
}
}

if (!show_in_pager)
if (!show_in_pager && !opt.status_only)
setup_pager();

if (!use_index && (untracked || cached))
Expand Down

0 comments on commit b70cec0

Please sign in to comment.