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

Re: [PATCH RESEND] archive: rewrite description for compression level option

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 15, 2021, 06:00 UTC
Message-ID
<xmqqpms6akup.fsf@gitster.g>
In-Reply-To
<87lf2vylj9.fsf@evledraar.gmail.com>
Æ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 - ."?

Previous: Ævar Arnfjörð Bjarmason
Message 5 of 5 in “archive: rewrite description for compression level option”
  1. archive: rewrite description for compression level optionBagas Sanjaya, Oct 14, 2021
  2. Junio C HamanoOct 14, 2021
  3. Bagas SanjayaOct 15, 2021
  4. Ævar Arnfjörð BjarmasonOct 15, 2021
  5. Junio C HamanoOct 15, 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.