summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
Diffstat (limited to 'morph')
-rwxr-xr-xmorph7
1 files changed, 5 insertions, 2 deletions
diff --git a/morph b/morph
index 377fc787..06548f9b 100755
--- a/morph
+++ b/morph
@@ -489,7 +489,10 @@ class Morph(cliapp.Application):
self._clone_to_directory(new_repo, repo, ref)
system_branch = self._deduce_system_branch()
- if system_branch != ref:
+ if system_branch == ref:
+ self.runcmd(['git', 'checkout', system_branch],
+ cwd=new_repo)
+ else:
self.runcmd(['git', 'checkout', '-b', system_branch, ref],
cwd=new_repo)
@@ -508,7 +511,7 @@ class Morph(cliapp.Application):
basename = os.path.basename(repo)
pull_from = os.path.join(mine, other_branch, basename)
repo_dir = os.path.join(mine, this_branch, basename)
- self.runcmd(['git', 'pull', pull_from], cwd=repo_dir)
+ self.runcmd(['git', 'pull', pull_from, other_branch], cwd=repo_dir)
def msg(self, msg):
'''Show a message to the user about what is going on.'''