Skip to content

Instantly share code, notes, and snippets.

@dabrahams
Created August 26, 2010 12:27
Show Gist options
  • Save dabrahams/551306 to your computer and use it in GitHub Desktop.
Save dabrahams/551306 to your computer and use it in GitHub Desktop.
diff --git a/src/ryppl/vcs/git.py b/src/ryppl/vcs/git.py
index 770ca33..0808936 100644
--- a/src/ryppl/vcs/git.py
+++ b/src/ryppl/vcs/git.py
@@ -15,8 +15,11 @@ class Git(PipGit):
if os.path.exists(location):
os.rmdir(location)
call_subprocess(
- [self.cmd, 'clone', '-b', rev or 'HEAD', url, location],
+ [self.cmd, 'clone', '-n', url, location],
filter_stdout=self._filter, show_stdout=False)
+ call_subprocess(
+ [self.cmd, 'checkout', rev],
+ filter_stdout=self._filter, show_stdout=False, cwd=location)
finally:
logger.indent -= 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment