{"thread":{"id":"56677","subject":"git archive -o something.tar.zst but file info just says \"POSIX tar archive\"","startedAt":"2021-10-10T11:19:59Z","lastAt":"2021-10-11T06:43:41Z","messageCount":3,"participants":["Bagas Sanjaya","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"438415","messageId":"e50a85f1-7be2-dab9-a453-fb93bdb71f3c@gmail.com","threadId":"56677","inReplyTo":null,"subject":"git archive -o something.tar.zst but file info just says \"POSIX tar archive\"","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-10-10T11:19:53Z","receivedAt":"2021-10-10T11:19:59Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"Hi,\n\nI noticed the following (possible bug?) when I tried to create zstd tar \narchive (.tar.zst) with `git archive`.\n\nFirst, I created the plain tar archive with `git archive`, then extract \nand rearchive to zstd tar achive:\n\n```\n(on the repo)\n\n$ git archive -o /tmp/something.tar --prefix=something/ HEAD\n\n(outside the repo, on /tmp)\n\n$ tar xvf something.tar\n$ tar --zstd -c -v -f something.tar.zst something/\n```\n\nI checked that the archive was indeed zstd tar archive:\n\n```\n$ file something.tar.zst\nsomething.tar.zst: Zstandard compressed data (v0.8+), Dictionary ID: None\n```\n\nNow I created the same archive with `git archive` directly:\n\n```\n(on the repo)\n\n$ git archive -o /tmp/something1.tar.zst --prefix=something/ HEAD\n```\n\nBut that archive info (with `file`) was something different:\n\n```\n(outside the repo, on /tmp)\n$ file something1.tar.zst\nsomething1.tar.zst: POSIX tar archive\n```\n\nI expected that `something1.tar.zst` was proper zstd tar archive, and \nnot plain archive like above.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"438416","messageId":"20211010114025.GA571180@szeder.dev","threadId":"56677","inReplyTo":"e50a85f1-7be2-dab9-a453-fb93bdb71f3c@gmail.com","subject":"Re: git archive -o something.tar.zst but file info just says \"POSIX tar archive\"","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2021-10-10T11:40:25Z","receivedAt":"2021-10-10T11:40:36Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Oct 10, 2021 at 06:19:53PM +0700, Bagas Sanjaya wrote:\n> I noticed the following (possible bug?) when I tried to create zstd tar\n> archive (.tar.zst) with `git archive`.\n\n> $ git archive -o /tmp/something1.tar.zst --prefix=something/ HEAD\n> ```\n> \n> But that archive info (with `file`) was something different:\n> \n> ```\n> (outside the repo, on /tmp)\n> $ file something1.tar.zst\n> something1.tar.zst: POSIX tar archive\n> ```\n> \n> I expected that `something1.tar.zst` was proper zstd tar archive, and not\n> plain archive like above.\n\n  $ git archive -h |grep -e ' -l'\n      -l, --list            list supported archive formats\n  $ git archive -l\n  tar\n  tgz\n  tar.gz\n  zip\n\nDoes it list zstd among the supported formats on your machine?\n\n"},{"id":"438444","messageId":"38ba34f9-47e5-8059-7c16-6cf159c849ad@gmail.com","threadId":"56677","inReplyTo":"20211010114025.GA571180@szeder.dev","subject":"Re: git archive -o something.tar.zst but file info just says \"POSIX tar archive\"","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-10-11T06:43:35Z","receivedAt":"2021-10-11T06:43:41Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 10/10/21 18.40, SZEDER Gábor wrote:\n>    $ git archive -h |grep -e ' -l'\n>        -l, --list            list supported archive formats\n>    $ git archive -l\n>    tar\n>    tgz\n>    tar.gz\n>    zip\n> \n> Does it list zstd among the supported formats on your machine?\n> \n\nOh, I forgot to add `tar.tar.zst` config option.\n\nNow `git archive -l` lists:\n\ntar\ntgz\ntar.gz\ntar.zst\ntar.bz2\ntar.xz\nzip\n\nand the corresponding .gitconfig are:\n\ntar.tar.zst.command=zstd -c\ntar.tar.bz2.command=bzip2 -c\ntar.tar.xz.command=xz -c\n\nThanks.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"}]}