From 32936bd5fa1d27260faa8074a80b64287fec90c7 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 26 Aug 2014 11:24:01 +0000 Subject: 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 --- morphlib/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morphlib/git.py b/morphlib/git.py index deb72eb6..d897de3b 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) -- cgit v1.2.1