summaryrefslogtreecommitdiff
path: root/t/t4013/diff.log_-SF_master_--max-count=0
diff options
context:
space:
mode:
authorLibravatar Wilhelm Schuermann <wimschuermann@googlemail.com>2015-03-18 19:00:13 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-19 11:54:03 -0700
commitc2048f0b394fc5d5644956481b39f3d099cbe51c (patch)
tree372ff4bcf147f2797dea4b22b2e5fa4827df1c17 /t/t4013/diff.log_-SF_master_--max-count=0
parentMerge branch 'maint-1.9' into maint-2.0 (diff)
downloadtgif-c2048f0b394fc5d5644956481b39f3d099cbe51c.tar.xz
grep: fix "--quiet" overwriting current output
When grep is called with the --quiet option, the pager is initialized despite not being used. When the pager is "less", anything output by previous commands and not ended with a newline is overwritten: $ echo -n aaa; echo bbb aaabbb $ echo -n aaa; git grep -q foo; echo bbb bbb This can be worked around, for example, by making sure STDOUT is not a TTY or more directly by setting git's pager to "cat": $ echo -n aaa; git grep -q foo > /dev/null; echo bbb aaabbb $ echo -n aaa; PAGER=cat git grep -q foo; echo bbb aaabbb But prevent calling the pager in the first place, which would also save an unnecessary fork(). Signed-off-by: Wilhelm Schuermann <wimschuermann@googlemail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.log_-SF_master_--max-count=0')
0 files changed, 0 insertions, 0 deletions