Set blame.ignoreRevsFile to .git-blame-ignore-revs.

This basically brings the functionality of git hyper-blame to git blame
by default and is supported since git 2.23.

Bug: none
Change-Id: I2023669deac999ef31d0e094e79d7214168acb63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5838110
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/10/5838110/2
Peter Kasting 11 months ago committed by LUCI CQ
parent 9e91079582
commit 9bbf9b0541

@ -671,9 +671,14 @@ class GitWrapper(SCMWrapper):
# the cache to set and unset consecutively.
config_updates = []
if scm.GIT.GetConfig(
args[0].checkout_path,
'blame.ignorerevsfile') != '.git-blame-ignore-revs':
config_updates.append(
('blame.ignoreRevsFile', '.git-blame-ignore-revs'))
if scm.GIT.GetConfig(args[0].checkout_path,
'diff.ignoresubmodules') != 'dirty':
# If diff.ignoreSubmodules is not already set, set it to `all`.
config_updates.append(('diff.ignoreSubmodules', 'dirty'))
if scm.GIT.GetConfig(args[0].checkout_path,

Loading…
Cancel
Save