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

Re: [PATCH] Introduce the config variable pack.packSizeLimit

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 9, 2008, 13:15 UTC
Message-ID
<alpine.LSU.1.00.0802091312350.11591@racer.site>
In-Reply-To
<7vbq6qfz94.fsf@gitster.siamese.dyndns.org>
Hi,
On Fri, 8 Feb 2008, Junio C Hamano wrote:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> >
> >> +test_expect_success \
> >> +    'honor pack.packSizeLimit' \
> >> +    'git config pack.packSizeLimit 200 &&
> >> +     packname_4=$(git pack-objects test-4 <obj-list) &&
> >> +     test 3 = $(ls test-4-*.pack | wc -l)'
> >> +
> >
> > Where does "3" come from, and what could break it?

It was in my test, and as I do not expect the obj-list (as well as the contents it references to change), I just fixed it to 3.

Show 17 quoted lines
> How about doing it like this, instead?
> 
> diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
> index 4f350dd..3eea478 100755
> --- a/t/t5300-pack-object.sh
> +++ b/t/t5300-pack-object.sh
> @@ -268,4 +268,12 @@ test_expect_success \
>      'make sure index-pack detects the SHA1 collision' \
>      '! git-index-pack -o bad.idx test-3.pack'
>  
> +test_expect_success 'honor pack.packSizeLimit' '
> +     limit=200 &&
> +     git config pack.packSizeLimit $limit &&
> +     packname_4=$(git pack-objects test-4 <obj-list) &&
> +     bigger=$(find test-4-*.pack -size +${limit}c) &&
> +     test -z "$bigger"
> +'

Sure (with minor modifications). I was not certain if I could rely on find being available everywhere, and understanding -size.

Minor modification that is necessary: MacOSX' find does not accept a find call like that. It must be

	bigger=$(find . -name test-4-*.pack -size +${limit}c) &&

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “Introduce the config variable pack.packSizeLimit”
  1. Introduce the config variable pack.packSizeLimitJohannes Schindelin, Feb 5, 2008
  2. Junio C HamanoFeb 9, 2008
  3. Junio C HamanoFeb 9, 2008
  4. Johannes SchindelinFeb 9, 2008
  5. Junio C HamanoFeb 9, 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.