diff options
author | Prameet Shah <phshah@google.com> | 2017-11-27 11:27:00 -0800 |
---|---|---|
committer | Prameet Shah <phshah@google.com> | 2017-11-27 21:46:10 +0000 |
commit | 9e01ab18dc9589d5a802a134bfa5800bb8dff580 (patch) | |
tree | 07215a361d165d0aad764476ea47473470081902 | |
parent | 97e923f9f084f3b8aa1f8a8ee7cccbb31821eea4 (diff) | |
download | repohooks-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.py | 2 | ||||
-rwxr-xr-x | tools/google-java-format.py | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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'] |