Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: git_cl.py

Issue 1110293002: Make git cl upload correctly track upstream refs when uploading to Gerrit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Long line fix & rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index b94be71c872a5c1db9679662fa49cd01da227c58..1f7854551cb112dfc9647896ad28089f874036c2 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))
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698