Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 378623770f1f3221e9a1d91f6cfc59d0c19e04e4
- Author: Richard Maw <[email protected]>
- Date: Tue Aug 26 11:24:01 2014 +0000
- 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.
- 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)
Advertisement
Add Comment
Please, Sign In to add comment