From db9b0e3a04439010e3f577458a53c5f5dac16808 Mon Sep 17 00:00:00 2001 From: "cmp@chromium.org" Date: Wed, 6 Jun 2012 19:10:17 +0000 Subject: [PATCH] Revert "Turn on git diff copy detection for git-cl upload." This reverts commit db5a0def789d6fc1392358da1456b5247473788c. TBR=maruel@chromium.org Review URL: https://chromiumcodereview.appspot.com/10532034 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140808 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 7 ++----- tests/git_cl_test.py | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/git_cl.py b/git_cl.py index d2f4b31f3..2c63d7330 100755 --- a/git_cl.py +++ b/git_cl.py @@ -1019,10 +1019,7 @@ def RietveldUpload(options, args, cl): upload_args.extend(['--base_url', remote_url]) try: - # upload uses '-C' by default when generating the diff for upload. - # Add another '-C' to trigger --find-copies-harder. - issue, patchset = upload.RealMain(['upload'] + upload_args + args + - ['--', '-C']) + issue, patchset = upload.RealMain(['upload'] + upload_args + args) except KeyboardInterrupt: sys.exit(1) except: @@ -1115,7 +1112,7 @@ def CMDupload(parser, args): if 'GIT_EXTERNAL_DIFF' in env: del env['GIT_EXTERNAL_DIFF'] subprocess2.call( - ['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C'] + args, env=env) + ['git', 'diff', '--no-ext-diff', '--stat', '-M'] + args, env=env) if settings.GetIsGerrit(): return GerritUpload(options, args, cl) diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index c3fdb0754..e0705fad6 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -114,7 +114,7 @@ class TestGitCl(TestCase): ((['git', 'config', 'branch.master.rietveldpatchset'],), ''), ((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'), ((['git', 'config', 'user.email'],), 'me@example.com'), - ((['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C', 'master...'],), + ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],), '+dat'), ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'), ] @@ -217,7 +217,7 @@ class TestGitCl(TestCase): '--message', description ] + args + [ '--cc', 'joe@example.com', - 'master...', '--', '-C', + 'master...' ] def _run_reviewer_test( @@ -347,7 +347,7 @@ class TestGitCl(TestCase): ((['git', 'config', 'branch.master.rietveldpatchset'],), ''), ((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'), ((['git', 'config', 'user.email'],), 'me@example.com'), - ((['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C', 'master...'],), + ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],), '+dat'), ]