Index: tools/push-to-trunk/git_recipes.py |
diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py |
index 7cfbeca0a36e0c730dc8f40745683068b1bd36f2..d57dc848f0bab77d0464586a51b7a6a3d7b37035 100644 |
--- a/tools/push-to-trunk/git_recipes.py |
+++ b/tools/push-to-trunk/git_recipes.py |
@@ -105,9 +105,10 @@ class GitRecipesMixin(object): |
def GitBranch(self, **kwargs): |
return self.Git("branch", **kwargs) |
- def GitCreateBranch(self, name, branch="", **kwargs): |
+ def GitCreateBranch(self, name, remote="", **kwargs): |
assert name |
- self.Git(MakeArgs(["checkout -b", name, branch]), **kwargs) |
+ remote_args = ["--upstream", remote] if remote else [] |
+ self.Git(MakeArgs(["new-branch", name] + remote_args), **kwargs) |
def GitDeleteBranch(self, name, **kwargs): |
assert name |