git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git archive -o something.tar.zst but file info just says "POSIX tar archive"

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Oct 10, 2021, 11:19 UTC
Message-ID
<e50a85f1-7be2-dab9-a453-fb93bdb71f3c@gmail.com>
Hi,

I noticed the following (possible bug?) when I tried to create zstd tar archive (.tar.zst) with `git archive`.

First, I created the plain tar archive with `git archive`, then extract and rearchive to zstd tar achive:

``` (on the repo)

$ git archive -o /tmp/something.tar --prefix=something/ HEAD
(outside the repo, on /tmp)

$ tar xvf something.tar $ tar --zstd -c -v -f something.tar.zst something/ ```

I checked that the archive was indeed zstd tar archive:

``` $ file something.tar.zst something.tar.zst: Zstandard compressed data (v0.8+), Dictionary ID: None ```

Now I created the same archive with `git archive` directly:

``` (on the repo)

$ git archive -o /tmp/something1.tar.zst --prefix=something/ HEAD ```

But that archive info (with `file`) was something different:

``` (outside the repo, on /tmp) $ file something1.tar.zst something1.tar.zst: POSIX tar archive ```

I expected that `something1.tar.zst` was proper zstd tar archive, and not plain archive like above.

-- 
An old man doll... just what I always wanted! - Clara
Next: SZEDER Gábor
Message 1 of 3 in “git archive -o something.tar.zst but file info just says "POSIX tar archive"”
  1. Bagas SanjayaOct 10, 2021
  2. SZEDER GáborOct 10, 2021
  3. Bagas SanjayaOct 11, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.