git cl upload for Gerit no-squash: correct detect missing Change-Id.

BUG=579183

Review URL: https://codereview.chromium.org/1761743002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299105 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index 62b542c..1ded4aa 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -48,7 +48,7 @@
 import fix_encoding
 import gclient_utils
 import git_common
-from git_footers import get_footer_svn_id
+import git_footers
 import owners
 import owners_finder
 import presubmit_support
@@ -2146,7 +2146,7 @@
   git_command = ['commit', '--amend', '-m', log_desc]
   RunGit(git_command)
   new_log_desc = CreateDescriptionFromLog(args)
-  if CHANGE_ID in new_log_desc:
+  if git_footers.get_footer_change_id(new_log_desc):
     print 'git-cl: Added Change-Id to commit message.'
   else:
     print >> sys.stderr, 'ERROR: Gerrit commit-msg hook not available.'
@@ -2264,7 +2264,7 @@
     ref_to_push = RunGit(['commit-tree', tree, '-p', parent,
                           '-m', message]).strip()
   else:
-    if CHANGE_ID not in change_desc.description:
+    if not git_footers.get_footer_change_id(change_desc.description):
       AddChangeIdToCommitMessage(options, args)
     ref_to_push = 'HEAD'
     parent = '%s/%s' % (gerrit_remote, branch)
@@ -3076,7 +3076,7 @@
 def CMDdcommit(parser, args):
   """Commits the current changelist via git-svn."""
   if not settings.GetIsGitSvn():
-    if get_footer_svn_id():
+    if git_footers.get_footer_svn_id():
       # If it looks like previous commits were mirrored with git-svn.
       message = """This repository appears to be a git-svn mirror, but no
 upstream SVN master is set. You probably need to run 'git auto-svn' once."""
@@ -3098,7 +3098,7 @@
 @subcommand.usage('[upstream branch to apply against]')
 def CMDland(parser, args):
   """Commits the current changelist via git."""
-  if settings.GetIsGitSvn() or get_footer_svn_id():
+  if settings.GetIsGitSvn() or git_footers.get_footer_svn_id():
     print('This appears to be an SVN repository.')
     print('Are you sure you didn\'t mean \'git cl dcommit\'?')
     print('(Ignore if this is the first commit after migrating from svn->git)')