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
MIT License
372 stars 81 forks source link

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

Open qmonnet opened 1 year ago

qmonnet commented 1 year ago

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.