Make --target_branch override AutoDetectBranch

AutoDetectBranch was added to support the fact that cobalt
is normally not submitting CLs to master, which was the git
cl upload default.
Unfortunately, AutoDetectBranch does not work as expected when
working with dependent cls (git new-branch --upstream_current).
This change allows a developer to use dependent cls, and specify
--target_branch=COBALT to ensure that they are uploaded to the correct
branch.

Change-Id: I38b49c98092cf251ead1e23ace39020eb9bdfe37
diff --git a/git_cl.py b/git_cl.py
index e7214bf..5d39cab 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1595,17 +1595,16 @@
   remote = 'origin'
   branch = 'master'
 
-  if settings.GetIsGerritAutoDetectBranch() == 'true':
+  if options.target_branch:
+    remote = 'origin'
+    branch = options.target_branch
+  elif settings.GetIsGerritAutoDetectBranch() == 'true':
     retcode, result = RunGitWithCode(['rev-parse', '--abbrev-ref', '@{u}'])
     if retcode != 0:
       print('Unable to auto-detect remote branch.')
       return 1
     remote, branch = result.strip().split('/')
 
-  if options.target_branch:
-    remote = 'origin'
-    branch = options.target_branch
-
   change_desc = ChangeDescription(
       options.message or CreateDescriptionFromLog(args))
   if not change_desc.description: