aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrameet Shah <phshah@google.com>2017-11-27 11:27:00 -0800
committerPrameet Shah <phshah@google.com>2017-11-27 21:46:10 +0000
commit9e01ab18dc9589d5a802a134bfa5800bb8dff580 (patch)
tree07215a361d165d0aad764476ea47473470081902
parent97e923f9f084f3b8aa1f8a8ee7cccbb31821eea4 (diff)
downloadrepohooks-9e01ab18dc9589d5a802a134bfa5800bb8dff580.tar.gz
Disallow external diff drivers in rh/git.py and google-java-format.py
Bug: None Test: Ran "git diff HEAD^" and verified that the external diff tool was not being used. Change-Id: I13cfefcf9abf032ad20a9313683eb75442234963
-rw-r--r--rh/git.py2
-rwxr-xr-xtools/google-java-format.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/rh/git.py b/rh/git.py
index fb3f0f4..5ce6c31 100644
--- a/rh/git.py
+++ b/rh/git.py
@@ -145,7 +145,7 @@ def raw_diff(path, target):
"""
entries = []
- cmd = ['git', 'diff', '-M', '--raw', target]
+ cmd = ['git', 'diff', '--no-ext-diff', '-M', '--raw', target]
diff = rh.utils.run_command(cmd, cwd=path, capture_output=True).output
diff_lines = diff.strip().splitlines()
for line in diff_lines:
diff --git a/tools/google-java-format.py b/tools/google-java-format.py
index 3e88358..b0b164c 100755
--- a/tools/google-java-format.py
+++ b/tools/google-java-format.py
@@ -78,7 +78,7 @@ def main(argv):
# TODO: Delegate to the tool once this issue is resolved:
# https://github.com/google/google-java-format/issues/107
- diff_cmd = ['git', 'diff', '-U0', '%s^!' % opts.commit]
+ diff_cmd = ['git', 'diff', '--no-ext-diff', '-U0', '%s^!' % opts.commit]
diff = rh.utils.run_command(diff_cmd, capture_output=True).output
cmd = [opts.google_java_format_diff, '-p1', '--aosp']