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

Re: [PATCH] fix pack.packSizeLimit and --max-pack-size handling

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2008, 17:46 UTC
Message-ID
<7vk5b8q1l4.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.00.0811121109420.27509@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 10 quoted lines
> First, pack.packSizeLimit and --max-pack-size didn't use the same base
> unit which was confusing.  They both use MiB now.
>
> Also, if the limit was sufficiently low, having a single object written
> could bust the limit (by design), but caused the remaining allowed size 
> to go negative for subsequent objects, which for an unsigned variable is 
> a rather huge limit.
>
> Signed-off-by: Nicolas Pitre <nico@cam.org>
> ---
Show 6 quoted lines
> @@ -1844,7 +1848,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
>  		return 0;
>  	}
>  	if (!strcmp(k, "pack.packsizelimit")) {
> -		pack_size_limit_cfg = git_config_ulong(k, v);
> +		pack_size_limit_cfg = git_config_ulong(k, v) * 1024 * 1024;

The fix to tweak the limit for subsequent split pack is a good thing to have, but this change would break existing repositories where people specified 20971520 (or worse yet "20m") to limit the size to 20MB.

I think --max-pack-size is what should be fixed to use git_parse_ulong() to match the configuration, if you find the discrepancy disturbing.

Previous: Nicolas PitreNext: Nicolas Pitre
Message 3 of 7 in “pack.packSizeLimit and --max-pack-size not working?”
  1. Jon NelsonNov 12, 2008
  2. fix pack.packSizeLimit and --max-pack-size handlingNicolas Pitre, Nov 12, 2008
  3. Junio C HamanoNov 12, 2008
  4. fix pack.packSizeLimit and --max-pack-size handlingNicolas Pitre, Nov 12, 2008
  5. Junio C HamanoNov 12, 2008
  6. Nanako ShiraishiNov 12, 2008
  7. Jon NelsonNov 12, 2008

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.