From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Bagas Sanjaya" <bagasdotme@gmail.com>,
git@vger.kernel.org, vagabon.xyz@gmail.com,
"Jeff King" <peff@peff.net>, "René Scharfe" <l.s.r@web.de>
Subject: Re: [PATCH RESEND] archive: rewrite description for compression level option
Date: Thu, 14 Oct 2021 23:00:14 -0700 [thread overview]
Message-ID: <xmqqpms6akup.fsf@gitster.g> (raw)
In-Reply-To: <87lf2vylj9.fsf@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Fri, 15 Oct 2021 06:11:01 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Whatever we do here maybe we'd do well to emulate what "man gzip" does,
> up to and including perhaps adding the --fast and --best synonyms to
> "git archive"?
This section of the documentation is not about describing .tar.gz
but about .zip, so emulating "man gzip" to replace the description
under discussion may not be an excellent idea. FWIW, "zip -h" on a
system where "zip" is Info-ZIP gives
$ zip -h
...
-0 store only -9 compress better
...
and the existing "-0 or -9" that hints intermediate numbers are
possible matches its spirit.
At the implementation level, the parsing of -<number> is shared
across archivers, but ARCHIVER_HIGH_COMPRESSION_LEVELS bit is only
enabled in archive-tar, and not in archive-zip, which means that
archive-tar can take -10 and higher compression levels while
archive-zip would not, I think. If we are to add a separate
desciption for -<number> to .tar.gz format, it would work well, as
we would not want to say it is limited to '-9' there.
As to --fast/--best, I am not sure how well it would work with
either. Would "tar" take "tar zcf - --fast ." or "tar zc9f - ."?
prev parent reply other threads:[~2021-10-15 6:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 12:02 [PATCH RESEND] archive: rewrite description for compression level option Bagas Sanjaya
2021-10-14 16:51 ` Junio C Hamano
2021-10-15 3:22 ` Bagas Sanjaya
2021-10-15 4:11 ` Ævar Arnfjörð Bjarmason
2021-10-15 6:00 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpms6akup.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
--cc=vagabon.xyz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).