summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-08-26 11:24:01 (GMT)
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-26 11:37:21 (GMT)
commit32936bd5fa1d27260faa8074a80b64287fec90c7 (patch)
tree797a99020a8679e10042ebb91b6f26bd389b2473
parent23e86c643a82731aba6561321b8bb5b168e80598 (diff)
downloadmorph-32936bd5fa1d27260faa8074a80b64287fec90c7.tar.gz
Fix `morph edit` for non-file URIs
The clone_into function is non-functional when you pass it a sha1 ref. If you have a file:// URI then this doesn't get used, which is how it slipped past the tests. Reviewed-by: Lars Wirzenius +2
-rw-r--r--morphlib/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/git.py b/morphlib/git.py
index deb72eb..d897de3 100644
--- a/morphlib/git.py
+++ b/morphlib/git.py
@@ -307,7 +307,7 @@ def clone_into(runcmd, srcpath, targetpath, ref=None):
gitcmd(runcmd, 'clone', srcpath, targetpath)
elif is_valid_sha1(ref):
gitcmd(runcmd, 'clone', srcpath, targetpath)
- gitcmd(runcmd, 'checkout', ref)
+ gitcmd(runcmd, 'checkout', ref, cwd=targetpath)
else:
gitcmd(runcmd, 'clone', '-b', ref, srcpath, targetpath)
gd = morphlib.gitdir.GitDirectory(targetpath)