git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Barret Rhoden <brho@google.com>
To: "René Scharfe" <l.s.r@web.de>,
	"Harrison McCullough" <mccullough.harrison@gmail.com>,
	git@vger.kernel.org
Subject: Re: git blame --ignore-rev does not work
Date: Fri, 2 Oct 2020 18:44:01 -0400	[thread overview]
Message-ID: <3e9b34f9-f61e-f3f1-45a3-6352641e434a@google.com> (raw)
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 = true

Which points out when --ignore-revs is doing something.

Thanks,

Barret



  reply	other threads:[~2020-10-02 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 21:15 git blame --ignore-rev does not work Harrison McCullough
2020-10-02 21:40 ` René Scharfe
2020-10-02 22:44   ` Barret Rhoden [this message]
2020-10-02 22:52     ` Harrison McCullough
2020-10-03  0:56       ` Barret Rhoden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e9b34f9-f61e-f3f1-45a3-6352641e434a@google.com \
    --to=brho@google.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=mccullough.harrison@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).