Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blame with --ignore-revs doesn't group the same commit together for some lines #4030

Closed
verhovsky opened this issue Jan 13, 2020 · 7 comments
Labels
area: blame enhancement New feature or request

Comments

@verhovsky
Copy link

verhovsky commented Jan 13, 2020

I have these lines in ~/.gitconfig

[blame]
    ignoreRevsFile = ~/.ignore-revs

in that file I put the hashes of a few large and useless commits like changing the formatter or mass-renamings, so that they don't show up in git blame. This works with Magit's blame, but it seems like it doesn't group the commits correctly and in the Magit blame view I'll sometimes get a a few lines in a row that are all shown as the same commit, but the line with the commit date and hash is repeated multiple times for lines that should be grouped

me        2019-10-05 12:12 "do stuff, commit A"
def foo():
me        2019-10-05 12:12 "do stuff, commit A"
    whatever()
me        2019-10-05 12:12 "do stuff, commit A"
    some_other_stuff()
    2 + 2
me        2019-10-05 12:12 "do stuff, some other commit B"
    return True
me        2019-10-05 12:12 "do stuff, commit A"


--ignore-revs and --ignore-revs-file were added to git blame fairly recently, in Git 2.23

@tarsius tarsius added the enhancement New feature or request label Jan 13, 2020
@tarsius

This comment has been minimized.

@kyleam

This comment has been minimized.

@tarsius

This comment has been minimized.

@tarsius

This comment has been minimized.

@kyleam

This comment has been minimized.

@tarsius
Copy link
Member

tarsius commented Jan 22, 2020

We get neighboring chunks that are attributed to the same commit because we use the --incremental argument. We could try to merge these chunks again in magit-blame--make-overlays.

@tarsius
Copy link
Member

tarsius commented Feb 7, 2020

...but for the time being I am going to consider this a feature. 😜
Merging the neighboring chunks is not a priority at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: blame enhancement New feature or request
Development

No branches or pull requests

3 participants