Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index d4486e5b10abd24e0667f0b6509695950029660d..12b59216e2a27d94b47f68bb772f3c50e58b1ba8 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -1702,9 +1702,10 @@ def GerritUpload(options, args, cl, change): |
# We assume the remote called "origin" is the one we want. |
# It is probably not worthwhile to support different workflows. |
gerrit_remote = 'origin' |
- branch = 'master' |
- if options.target_branch: |
- branch = options.target_branch |
+ |
+ remote, remote_branch = cl.GetRemoteBranch() |
+ branch = GetTargetRef(remote, remote_branch, options.target_branch, |
+ pending_prefix='') |
change_desc = ChangeDescription( |
options.message or CreateDescriptionFromLog(args)) |