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

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

From
Jeff King <peff@peff.net>
Date
May 28, 2020, 16:45 UTC
Message-ID
<20200528164533.GA1223132@coredump.intra.peff.net>
In-Reply-To
<0da84168-3d81-fb14-32ad-010ef2436958@iee.email>
On Wed, May 27, 2020 at 11:24:54AM +0100, Philip Oakley wrote:
Show 9 quoted lines
> > I'm not convinced this is a useful thing to do in general. Lines don't
> > always stand on their own, and you'd lack context for deciphering them.
> > So a real example from "git blame -b --since=1.year.ago Makefile", for
> > example (pardon the long lines):
> 
> My contention is that there is a lot of effort needed _beforehand_ to
> reach that point. We've already had to page down 2700 line to get there,
> and then had to carefully select the differing before and after context
> lines.
I think:
  git blame -b --since=1.year.ago ... | less "+/^[^ ]"

works pretty well to get you to the right spot, with context (and then "/<enter>" within less takes you to the next line).

But that's also pretty magical.
> The use of the --blame-only (especially with broad date range --since)
> is to quickly narrow focus with the rather large file to the few areas
> of concern (probably related why the -b was introduced initially?)

Perhaps. I think when you get an out-of-context chunk, though, it's tricky to take the next step.

I'm still skeptical this will turn out to be all that useful in practice. But it really isn't much code to carry, so I don't have any real objection.

-Peff
Previous: Philip OakleyNext: Junio C Hamano
Message 10 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.