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

Re: Feature suggestion: git grep --blame

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jun 20, 2009, 18:19 UTC
Message-ID
<4A3D281E.4070500@lsrfire.ath.cx>
In-Reply-To
<B13F8D3F-E69B-49BA-9B81-27DF19E33A43@endpoint.com>
David Christensen schrieb:
Show 10 quoted lines
> Hey folks,
> 
> It's occurred to me on several occasions that a useful output option for
> `git grep` would be to prefix lines with the same commit/author/date
> annotation that `git blame` shows when viewing an individual file.  I
> didn't find anything myself with a quick google search so I was
> wondering if anyone a) has a recipe for this either with a trivial
> command alias (I couldn't come up with one myself), b) know if this has
> been done/attempted before, or c) have a reason why this is a really
> stupid idea? :-)

This is a very good idea -- so good, in fact, that Pi Song sent patches to implement it a quarter ago. There were a few issues which prevented them from being merged unchanged. Junio merged an initial cleanup patch into pu instead ("blame.c: start libifying the blame infrastructure", 97926c6c). Work on the remaining parts seems to have stalled, though. Pi Song?

René
Previous: David Christensen
Message 2 of 2 in “Feature suggestion: git grep --blame”
  1. David ChristensenJun 20, 2009
  2. René ScharfeJun 20, 2009

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.