st3-gitblame
st3-gitblame copied to clipboard
Add a new "ignorerevs_files" setting
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.
https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
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