瀏覽代碼

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>
Peter Kasting 11 月之前
父節點
當前提交
9bbf9b0541
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      gclient_scm.py

+ 6 - 1
gclient_scm.py

@@ -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,