Kentzo / git-archive-all

A python script wrapper for git-archive that archives a git superproject and its submodules, if it has any. Takes into account .gitattributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing compression level with `xz` or `txz` output formats does not work

qmonnet opened this issue · comments

Tar output formats xz and txz do not work when passing an explicit compression level:

$ python3 ./git_archive_all.py /tmp/foo.zip -9
[works]
$ python3 ./git_archive_all.py /tmp/foo.xz  -9 
xz cannot be compressed
$ python3 ./git_archive_all.py /tmp/foo.txz -9
txz cannot be compressed

From this link, it looks like these formats expect the compression level to be passed by the preset argument in tarfile.open(), instead of compresslevel.