[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 0/4] Selectively show only blamed limes
From:       Junio C Hamano <gitster () pobox ! com>
Date:       2020-05-31 16:28:23
Message-ID: xmqqlfl8vzko.fsf () gitster ! c ! googlers ! com
[Download RAW message or body]

Junio C Hamano <gitster@pobox.com> writes:

> Instead of teaching each and every tool (like "git blame", "diff",
> "grep", etc.) a special trick to remove the lines from its output,
> it may make a lot more sense to add a feature to pagers that lets
> the users selectively "hide" the matching lines given a pattern.
> Then when viewing "git blame -b" output, you can first declare
> "lines that begin with a whitespace are sometimes uninteresting" and
> then tell your pager "now unshow uninteresting lines", "the same, but
> show 3 lines at the boundary of runs of uninteresting lines", "now
> show everything", etc.

I forgot to say what I wanted to touch a bit more.  Such a feature
in pager is readily reusable for other types of payload.  "Lines
that begin with a whitespace are sometimes uninteresting" can also
be used for output from "diff -u -U<largenumber>", and "lines that
do not match '^[^:]*:[0-9]*:' are not interesting" can be used for
output from "grep n -C".  That would be a lot more sensible than
tweaking each and every tool that generates output that sometimes
needs to be read in full and sometimes needs to be shown with less
interesting parts ellided.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic