git cl for Gerrit: make --squash generate Change-Id directly.
BUG=579183
Review URL: https://codereview.chromium.org/1763593002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299107 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index f1cee8a..e4a412b 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -17,6 +17,7 @@
import git_cl
import git_common
+import git_footers
import subprocess2
class PresubmitMock(object):
@@ -588,7 +589,7 @@
'fake_ancestor_sha..HEAD'],),
description)
]
- if git_cl.CHANGE_ID not in description:
+ if not git_footers.get_footer_change_id(description) and not squash:
calls += [
((['git', 'log', '--pretty=format:%s\n\n%b',
'fake_ancestor_sha..HEAD'],),