Guest User

Untitled

a guest
Aug 26th, 2014
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. commit 378623770f1f3221e9a1d91f6cfc59d0c19e04e4
  2. Author: Richard Maw <[email protected]>
  3. Date: Tue Aug 26 11:24:01 2014 +0000
  4.  
  5. Fix `morph edit` for non-file URIs
  6.  
  7. The clone_into function is non-functional when you pass it a sha1 ref.
  8.  
  9. If you have a file:// URI then this doesn't get used, which is how it
  10. slipped past the tests.
  11.  
  12. diff --git a/morphlib/git.py b/morphlib/git.py
  13. index deb72eb..d897de3 100644
  14. --- a/morphlib/git.py
  15. +++ b/morphlib/git.py
  16. @@ -307,7 +307,7 @@ def clone_into(runcmd, srcpath, targetpath, ref=None):
  17. gitcmd(runcmd, 'clone', srcpath, targetpath)
  18. elif is_valid_sha1(ref):
  19. gitcmd(runcmd, 'clone', srcpath, targetpath)
  20. - gitcmd(runcmd, 'checkout', ref)
  21. + gitcmd(runcmd, 'checkout', ref, cwd=targetpath)
  22. else:
  23. gitcmd(runcmd, 'clone', '-b', ref, srcpath, targetpath)
  24. gd = morphlib.gitdir.GitDirectory(targetpath)
Advertisement
Add Comment
Please, Sign In to add comment