lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: git feature request: git blame --ignore-cleanup/--ignore-trivial
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

\
 
 \ /
  Last update: 2021-06-02 23:17    [W:1.224 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site