summaryrefslogtreecommitdiff
path: root/morphlib/plugins/push_pull_plugin.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-06 16:31:34 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-06 16:31:34 +0000
commit6779e46e880eec757a6923441accef2442007677 (patch)
treead0dd5c28927cfcb5410760930b5bdfafaf5e948 /morphlib/plugins/push_pull_plugin.py
parenta04cb6cf9e3ad745af8b3c4d4675cfd4c3b12df1 (diff)
parent1a86803340081b9e929bb77491dfe01020516164 (diff)
downloadmorph-6779e46e880eec757a6923441accef2442007677.tar.gz
Merge branch 'sam/gitdir-fixes-v2'
Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk>
Diffstat (limited to 'morphlib/plugins/push_pull_plugin.py')
-rw-r--r--morphlib/plugins/push_pull_plugin.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/plugins/push_pull_plugin.py b/morphlib/plugins/push_pull_plugin.py
index 843de1a6..ddc9a8af 100644
--- a/morphlib/plugins/push_pull_plugin.py
+++ b/morphlib/plugins/push_pull_plugin.py
@@ -52,7 +52,7 @@ class PushPullPlugin(cliapp.Plugin):
if len(args) != 2:
raise morphlib.Error('push must get exactly two arguments')
- gd = morphlib.gitdir.GitDirectory(os.getcwd())
+ gd = morphlib.gitdir.GitDirectory(os.getcwd(), search_for_root=True)
remote, branch = args
rs = morphlib.gitdir.RefSpec(branch)
gd.get_remote(remote).push(rs)
@@ -81,7 +81,7 @@ class PushPullPlugin(cliapp.Plugin):
if len(args) > 1:
raise morphlib.Error('pull takes at most one argument')
- gd = morphlib.gitdir.GitDirectory(os.getcwd())
+ gd = morphlib.gitdir.GitDirectory(os.getcwd(), search_for_root=True)
remote = gd.get_remote('origin')
if args:
branch = args[0]