hustnzj
hustnzj

Reputation: 835

Why the `git config tar.tar.xz.command "xz -c"` command can configure a "tar.xz" format for making LZMA-compressed tarfiles when using git-archive?

I encountered this example in Git official documents when learning git-archive.

git config tar.tar.xz.command "xz -c" # set this config
git archive -o latest.tar.xz HEAD  # So you can create an archive that is compressed with LZMA algorithm. 

But Why does this trick work? Is the tar.<extension-name>.command an convention? And where the convention comes from?

I had read the manpage of git-archive, git-config, and tar, searched this question and related keyword in Google but unfortunately still can't find the answer...

Thank you very much for your kindly help!

Upvotes: 0

Views: 219

Answers (0)

Related Questions