depot_tools: Restore appending title before change description.

On an initial upload, git-cl upload -t <title> should append <title>
before the change description.

This broke because options.squash is set to a default value very late
into code execution, so its value was not available when computing the
initial description.

options.squash is now set when parsing the options, early into code
execution.

Bug: 1064905
Change-Id: I04a18c572dd5b04a3013d39f71bc43d026ea85d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2122324
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 36fd989..2f28fe3 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1436,7 +1436,7 @@
     else:
       description = _create_description_from_log(git_diff_args)
       if options.title and options.squash:
-        description = options.title + '\n\n' + message
+        description = options.title + '\n\n' + description
 
     # Extract bug number from branch name.
     bug = options.bug
@@ -2260,10 +2260,6 @@
   def CMDUploadChange(
       self, options, git_diff_args, custom_cl_base, change_desc):
     """Upload the current branch to Gerrit."""
-    if options.squash is None:
-      # Load default for user, repo, squash=true, in this order.
-      options.squash = settings.GetSquashGerritUploads()
-
     remote, remote_branch = self.GetRemoteBranch()
     branch = GetTargetRef(remote, remote_branch, options.target_branch)
 
@@ -4287,6 +4283,10 @@
   if options.use_commit_queue:
     options.send_mail = True
 
+  if options.squash is None:
+    # Load default for user, repo, squash=true, in this order.
+    options.squash = settings.GetSquashGerritUploads()
+
   cl = Changelist()
   # Warm change details cache now to avoid RPCs later, reducing latency for
   # developers.