Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1502)

Unified Diff: tests/git_cl_test.py

Issue 10945002: Add option to specify similarity level for git diff operations on commandline (Closed) Base URL: https://git.chromium.org/chromium/tools/depot_tools.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index f02465db9e74a7014db6ad1be382689494ee3177..9667a1461335548714ee9b5c88209cab117e7cc3 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -115,7 +115,7 @@ class TestGitCl(TestCase):
((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'),
((['git', 'config', 'user.email'],), 'me@example.com'),
((['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
- '-l100000', 'master...'],),
+ '-C50', '-l100000', 'master...'],),
'+dat'),
((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'),
]
@@ -193,7 +193,8 @@ class TestGitCl(TestCase):
def _dcommit_calls_3(cls):
return [
((['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
- '-l100000', 'refs/remotes/origin/master', 'refs/heads/working'],),
+ '-C50', '-l100000', 'refs/remotes/origin/master',
+ 'refs/heads/working'],),
(' PRESUBMIT.py | 2 +-\n'
' 1 files changed, 1 insertions(+), 1 deletions(-)\n')),
(('About to commit; enter to confirm.',), None),
@@ -209,7 +210,8 @@ class TestGitCl(TestCase):
((['git', 'commit', '-m',
'Issue: 12345\n\nReview URL: https://codereview.example.com/12345'],),
''),
- ((['git', 'svn', 'dcommit', '--no-rebase', '--rmdir'],), (('', None), 0)),
+ ((['git', 'svn', 'dcommit', '-C50', '--no-rebase', '--rmdir'],),
+ (('', None), 0)),
((['git', 'checkout', '-q', 'working'],), ''),
((['git', 'branch', '-D', 'git-cl-commit'],), ''),
]
@@ -223,6 +225,7 @@ class TestGitCl(TestCase):
'--message', description
] + args + [
'--cc', 'joe@example.com',
+ '--git_similarity', '50',
'master...'
]
@@ -354,7 +357,7 @@ class TestGitCl(TestCase):
((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'),
((['git', 'config', 'user.email'],), 'me@example.com'),
((['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
- '-l100000', 'master...'],),
+ '-C50', '-l100000', 'master...'],),
'+dat'),
]

Powered by Google App Engine
This is Rietveld 408576698