git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/4] Selectively show only blamed limes

From
Junio C Hamano <gitster@pobox.com>
Date
May 31, 2020, 16:28 UTC
Message-ID
<xmqqlfl8vzko.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqtuzww0si.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> 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.

Previous: Junio C Hamano
Message 14 of 14 in “Selectively show only blamed limes”
  1. 0/4 Selectively show only blamed limesPhilip Oakley, May 25, 2020
  2. 1/4 doc: blame: show the boundary commit '^' caret markPhilip Oakley, May 25, 2020
  3. 2/4 blame: add option to show only blamed commits `--blame-only`Philip Oakley, May 25, 2020
  4. 3/4 blame: do not show boundary commits, only those blamedPhilip Oakley, May 25, 2020
  5. 4/4 blame: test the -b option, use blank oid for boundary commits.Philip Oakley, May 25, 2020
  6. Jeff KingMay 27, 2020
  7. Philip OakleyMay 27, 2020
  8. Jeff KingMay 27, 2020
  9. Philip OakleyMay 27, 2020
  10. Jeff KingMay 28, 2020
  11. Junio C HamanoMay 28, 2020
  12. Philip OakleyMay 30, 2020
  13. Junio C HamanoMay 31, 2020
  14. Junio C HamanoMay 31, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.