Re: git blame --ignore-rev does not work
- From
- Barret Rhoden <brho@google.com>
- Date
- Oct 2, 2020, 22:44 UTC
- Message-ID
- <3e9b34f9-f61e-f3f1-45a3-6352641e434a@google.com>
- In-Reply-To
- <d805f025-fbfb-0249-a50c-ff857dc2e29d@web.de>
Hi -
On 10/2/20 5:40 PM, René Scharfe wrote: [snip]
> I don't know if these revisions are not ignored due to bugs or because > the feature just isn't strong enough, yet, but I would expect your > particular case to be represented by at least one of these...
Correct.
When skipping a revision, the algorithm attempts to find another revision that could be responsible for the change. But it might not be able to find anything. Consider a commit that just adds a few lines to a file with only 'foo' and 'bar':
commit: "Adding Lines" ------------- foo +No commit +ever touched +these lines bar
If we ignored that revision, which commit do we assign those lines to? If they were "similar" to the existing lines, then the algorithm might match. But in general, we can't find 'correct' (as defined by a user) matches for arbitrary changes.
I usually run git with these settings:
[blame]
ignorerevsfile = .git-blame-ignore-revs
markIgnoredLines = true
markUnblamableLines = trueWhich points out when --ignore-revs is doing something.
Thanks,
Barret