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

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

From
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date
Jun 2, 2021, 15:20 UTC
Message-ID
<30399052.5964.1622647235870.JavaMail.zimbra@efficios.com>
Hi,

Following a discussion with Peter Zijlstra about whether code cleanup and functional changes done to the Linux kernel scheduler belong to separate patches or should be folded together, the argument for folding cleanup and function changes came to be mainly motivated by the current behavior of git blame: code cleanup patches end up burying the important changes so it becomes cumbersome to find them using git blame.

Considering the added value brought by splitting cleanups from functional changes from a maintainer perspective (easier reverts) and from a reviewer perspective (easier to focus on the functional changes), I think it would be good to improve the git tooling to allow easily filtering out the noise from git blame.

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.

Tagging patches as trivial and cleanup should be done in the patch commit message (possibly in the title), and enforcing proper tagging of commits is already the responsibility of the maintainer merging those cleanup/trivial commits into the Linux kernel anyway.

Under the hood, I suspect it could use something similar to git log --grep=<pattern> --invert-grep.

This should allow git blame users to easily filter out the noise and focus on the relevant functional changes.

Any maybe the patterns associated to "cleanup" and "trivial" commits should be something that can be configured through a git config file.

Thoughts ?
Thanks,
Mathieu
-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Next: Al Viro
Message 1 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.