st3-gitblame icon indicating copy to clipboard operation
st3-gitblame copied to clipboard

Add a new "ignorerevs_files" setting

Open frou opened this issue 3 years ago • 2 comments

There could be a new setting in this package called either "auto_discover_ignorerevs_file" (default false), or "ignorerevs_file" (default ""). The latter would be more flexible since it's not guaranteed that such a file always uses the conventional .git-blame-ignore-revs name (example). In either case the new setting should default to disabled, because by default I don't think this package should show different results than running plain git blame on the commandline does.

The file should be checked for relative to the root of the repo (discovered by calling git rev-parse --show-toplevel) and if it exists then --ignore-revs-file /path/to/file arguments should be added to calls to git.

We make use of the related --ignore-rev SHA option already as a way to build up state when pressing the [Prev] button to step back through commits in the UI.

Originally posted by @frou in https://github.com/frou/st3-gitblame/issues/58#issuecomment-823900171


Addendum: It should be "ignorerevs_files" (plural) and have an array as a value, so that multiple possibilities can be listed in descending priority.

frou avatar May 29 '21 08:05 frou

https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt

frou avatar Jan 29 '22 22:01 frou

GitHub itself has support for this too now: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view

frou avatar Apr 14 '22 09:04 frou