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

RE: git feature request: git blame --ignore-cleanup/--ignore-trivial

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 2, 2021, 21:16 UTC
Message-ID
<60b7f54697fda_16925f2083d@natae.notmuch>
In-Reply-To
<30399052.5964.1622647235870.JavaMail.zimbra@efficios.com>
Mathieu Desnoyers wrote:
> Perhaps a new git blame "--ignore-trivial" and/or "--ignore-cleanup" could solve
> this by filtering out "trivial" and "cleanup" patches from the history it considers.

While this feature would be a good addition, more often than not I need to look behind the latest commit regardless of whether or not it's a trivial one.

So what I often end up doing is a `git blame --incremental`:
  git blame --incremental -L100,+6 file.c | grep -o -e '^[0-9a-f]\{40\}'

This can be fed to `git log --stdin --oneline --no-walk` for more user-friendliness.

Of course you could just do:
  git log -L100,+6:file.c --oneline --no-patch
But for some reason that's much slower on my system.
Cheers.
-- 
Felipe Contreras
Previous: Jeff KingNext: David Sterba
Message 7 of 8 in “git feature request: git blame --ignore-cleanup/--ignore-trivial”
  1. Mathieu DesnoyersJun 2, 2021
  2. Al ViroJun 2, 2021
  3. Taylor BlauJun 2, 2021
  4. Mathieu DesnoyersJun 3, 2021
  5. David SterbaJun 3, 2021
  6. Jeff KingJun 2, 2021
  7. Felipe ContrerasJun 2, 2021
  8. David SterbaJun 3, 2021

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.