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

Re: [suggestion] support non-negative float number in git-repack --max-pack-size

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 8, 2021, 07:04 UTC
Message-ID
<xmqqfsxsq1l4.fsf@gitster.g>
In-Reply-To
<YL8RfGijMY95miHI@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Mon, Jun 07, 2021 at 01:42:47PM +0700, Bagas Sanjaya wrote:
>
>> I would like to create packfiles with charm-numbered size (that is for
>> example use 49.99M instead of 50M) with git-repack:
>> 
>> $ git repack --max-pack-size=49.99M -a -d
>
> The parser for numbers with units is shared by many options and config
> variables. In general, I'm not really opposed to allowing floating point
> values which get rounded to the nearest byte for any of them. So no
> objection for the general feature if somebody wants to implement it.
>
> But I would note that --max-pack-size is almost never a good idea in
> general. I don't know what you think it's accomplishing, but it is
> probably making your repository larger than it needs to be, as well as
> less performant.

Perhaps a doc update is in order? It might have been cute and superficially useful to be able to cut packfiles in 650M chunks to fit on a CD-ROM, but I suspect that it would be more useful to feed a single large file to a generic multi-volume archive tool and let it split it to fit the physical volume the tool deals with.

Previous: Jeff KingNext: Jeff King
Message 3 of 9 in “[suggestion] support non-negative float number in git-repack --max-pack-size”
  1. Bagas SanjayaJun 7, 2021
  2. Jeff KingJun 8, 2021
  3. Junio C HamanoJun 8, 2021
  4. doc: warn people against --max-pack-sizeJeff King, Jun 8, 2021
  5. Philip OakleyJun 17, 2021
  6. Jeff KingJun 18, 2021
  7. Philip OakleyJun 18, 2021
  8. Jeff KingJun 18, 2021
  9. Bagas SanjayaJun 12, 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.