Remove clang-format merge driver hook.
This is no longer needed now that the Blink reformat is done, and it
seems to cause issues with build configurations like the CrOS chroot
build.
Bug: 574611
Change-Id: Ia3f9a35a6b65faaa48acea5eabcd83f9afbf0793
Reviewed-on: https://chromium-review.googlesource.com/501534
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#470667}diff --git a/DEPS b/DEPS
index 52a209d..e654cda 100644
--- a/DEPS
+++ b/DEPS
@@ -1077,13 +1077,6 @@
],
},
{
- 'name': 'clang_format_merge_driver',
- 'pattern': '.',
- 'action': [ 'python',
- 'src/tools/clang_format_merge_driver/install_git_hook.py',
- ],
- },
- {
'name': 'devtools_install_node',
'action': [ 'python',
'src/third_party/WebKit/Source/devtools/scripts/local_node/node.py',
diff --git a/tools/clang_format_merge_driver/OWNERS b/tools/clang_format_merge_driver/OWNERS
deleted file mode 100644
index 7011ca3..0000000
--- a/tools/clang_format_merge_driver/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-dcheng@chromium.org
-thakis@chromium.org
-
-# COMPONENT: Tools
diff --git a/tools/clang_format_merge_driver/install_git_hook.py b/tools/clang_format_merge_driver/install_git_hook.py
deleted file mode 100755
index c4d67b5..0000000
--- a/tools/clang_format_merge_driver/install_git_hook.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-"""Hook to install the git config for using the clang-format merge driver."""
-
-import os
-import subprocess
-import sys
-
-_VERSION = 1
-
-
-def BuildGitCmd(*args):
- cmd = []
- if sys.platform == 'win32':
- cmd.append('git.bat')
- else:
- cmd.append('git')
- cmd.extend(args)
- return cmd
-
-
-def main():
- # Assume that the script always lives somewhere inside the git repo.
- os.chdir(os.path.dirname(os.path.abspath(__file__)))
-
- try:
- current_version = subprocess.check_output(
- BuildGitCmd('config', 'merge.clang-format.version'))
- try:
- if int(current_version) >= _VERSION:
- return
- except ValueError:
- # Not parseable for whatever reason: reinstall the config.
- pass
- except subprocess.CalledProcessError:
- # git returned a non-zero return code, the config probably doesn't exist.
- pass
-
- print 'Installing clang-format merge driver into .git/config...'
-
- subprocess.check_call(
- BuildGitCmd('config', 'merge.clang-format.name',
- 'clang-format merge driver'))
- subprocess.check_call(
- BuildGitCmd('config', 'merge.clang-format.driver',
- 'clang_format_merge_driver %O %A %B %P'))
- subprocess.check_call(
- BuildGitCmd('config', 'merge.clang-format.recursive', 'binary'))
- subprocess.check_call(
- BuildGitCmd('config', 'merge.clang-format.version', str(_VERSION)))
-
-
-if __name__ == '__main__':
- sys.exit(main())