Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: upload.py

Issue 29539660: Issue 5644 - Add --binary to git diff options (Closed)
Patch Set: Created Sept. 8, 2017, 10:17 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: upload.py
===================================================================
--- a/upload.py
+++ b/upload.py
@@ -1612,16 +1612,17 @@
del env["GIT_EXTERNAL_DIFF"]
# -M/-C will not print the diff for the deleted file when a file is renamed.
# This is confusing because the original file will not be shown on the
# review when a file is renamed. So, get a diff with ONLY deletes, then
# append a diff (with rename detection), without deletes.
cmd = [
"git", "diff", "--no-color", "--no-ext-diff", "--full-index",
"--ignore-submodules", "--src-prefix=a/", "--dst-prefix=b/",
+ "--binary",
]
diff = RunShell(
cmd + ["--no-renames", "--diff-filter=D"] + extra_args,
env=env, silent_ok=True)
assert 0 <= self.options.git_similarity <= 100
if self.options.git_find_copies:
similarity_options = ["-l100000", "-C%d%%" % self.options.git_similarity]
if self.options.git_find_copies_harder:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld