| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5f23379 commit 0ca61d4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | 7 | import os | |
| 8 | 8 | import re | |
| 9 | + import gzip | ||
| 10 | + import StringIO | ||
| 9 | 11 | from errors import InvalidGitRepositoryError, NoSuchPathError | |
| 10 | 12 | from utils import touch, is_git_dir | |
| 11 | 13 | from cmd import Git | |
@@ -386,7 +388,12 @@ def archive_tar_gz(self, treeish='master', prefix=None): | |||
| 386 | 388 | kwargs = {} | |
| 387 | 389 | if prefix: | |
| 388 | 390 | kwargs['prefix'] = prefix | |
| 389 | - self.git.archive(treeish, "| gzip", **kwargs) | ||
| 391 | + resultstr = self.git.archive(treeish, **kwargs) | ||
| 392 | + sio = StringIO.StringIO() | ||
| 393 | + gf = gzip.GzipFile(fileobj=sio, mode ='wb') | ||
| 394 | + gf.write(resultstr) | ||
| 395 | + gf.close() | ||
| 396 | + return sio.getvalue() | ||
| 390 | 397 | ||
| 391 | 398 | def _get_daemon_export(self): | |
| 392 | 399 | filename = os.path.join(self.path, self.DAEMON_EXPORT_FILE) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments