summaryrefslogtreecommitdiff
path: root/t/t4051/appended1.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-05-28 15:06:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-31 20:08:56 (GMT)
commit4aa2c4753d152aef810eaf3f3f4fa1df7035d9b0 (patch)
tree869b45194a074928acebae230d55b91b3d629043 /t/t4051/appended1.c
parent799e09e5fb9e23e2baae164ddc84a03879db6a6a (diff)
downloadgit-4aa2c4753d152aef810eaf3f3f4fa1df7035d9b0.zip
git-4aa2c4753d152aef810eaf3f3f4fa1df7035d9b0.tar.gz
git-4aa2c4753d152aef810eaf3f3f4fa1df7035d9b0.tar.bz2
grep: -W: don't extend context to trailing empty lines
Empty lines between functions are shown by grep -W, as it considers them to be part of the function preceding them. They are not interesting in most languages. The previous patches stopped showing them for diff -W. Stop showing empty lines trailing a function with grep -W. Grep scans the lines of a buffer from top to bottom and prints matching lines immediately. Thus we need to peek ahead in order to determine if an empty line is part of a function body and worth showing or not. Remember how far ahead we peeked in order to avoid having to do so repeatedly when handling multiple consecutive empty lines. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4051/appended1.c')
0 files changed, 0 insertions, 0 deletions