summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-23 17:20:51 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-23 17:20:51 +0000
commit80a9d3ee14688feada4bd799d02892ba66aa80fa (patch)
tree777b749729a5c6ca61768f642362dbb14782afb8 /morph
parenta117a2149cbfbe9df99b92df37e9a9c307256369 (diff)
downloadmorph-80a9d3ee14688feada4bd799d02892ba66aa80fa.tar.gz
Make "morph edit" work when chunk already has the branch
Diffstat (limited to 'morph')
-rwxr-xr-xmorph7
1 files changed, 5 insertions, 2 deletions
diff --git a/morph b/morph
index 16f98720..377fc787 100755
--- a/morph
+++ b/morph
@@ -487,8 +487,11 @@ class Morph(cliapp.Application):
new_repo = os.path.join(mine_directory, system_branch,
os.path.basename(repo))
self._clone_to_directory(new_repo, repo, ref)
- self.runcmd(['git', 'checkout', '-b', system_branch, ref],
- cwd=new_repo)
+
+ system_branch = self._deduce_system_branch()
+ if system_branch != ref:
+ self.runcmd(['git', 'checkout', '-b', system_branch, ref],
+ cwd=new_repo)
def cmd_merge(self, args):
'''Merge specified repositories from another system branch.'''