Re: [PATCH v3 8/8] maintenance: add incremental-repack auto condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
> index 5c08afc19a..6f878b0141 100755
> --- a/t/t7900-maintenance.sh
> +++ b/t/t7900-maintenance.sh
> @@ -220,4 +220,35 @@ test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
>  		 --no-progress --batch-size=2147483647 <run-2g.txt
>  '
>  
> +test_expect_success 'maintenance.incremental-repack.auto' '
> +	git repack -adk &&
> +	git config core.multiPackIndex true &&
> +	git multi-pack-index write &&

After this, there is exactly one pack, and it is in the MIDX.

> +	GIT_TRACE2_EVENT="$(pwd)/midx-init.txt" git \
> +		-c maintenance.incremental-repack.auto=1 \
> +		maintenance run --auto --task=incremental-repack 2>/dev/null &&
> +	test_subcommand ! git multi-pack-index write --no-progress <midx-init.txt &&
> +	for i in 1 2

Same comment as in the earlier patch - why 2 iterations?

> +	do
> +		test_commit A-$i &&
> +		git pack-objects --revs .git/objects/pack/pack <<-\EOF &&
> +		HEAD
> +		^HEAD~1
> +		EOF
> +		GIT_TRACE2_EVENT=$(pwd)/trace-A-$i git \
> +			-c maintenance.incremental-repack.auto=2 \
> +			maintenance run --auto --task=incremental-repack 2>/dev/null &&
> +		test_subcommand ! git multi-pack-index write --no-progress <trace-A-$i &&

OK - one pack not in the MIDX, so this does not get run.

> +		test_commit B-$i &&
> +		git pack-objects --revs .git/objects/pack/pack <<-\EOF &&
> +		HEAD
> +		^HEAD~1
> +		EOF
> +		GIT_TRACE2_EVENT=$(pwd)/trace-B-$i git \
> +			-c maintenance.incremental-repack.auto=2 \
> +			maintenance run --auto --task=incremental-repack 2>/dev/null &&
> +		test_subcommand git multi-pack-index write --no-progress <trace-B-$i || return 1

OK - 2 packs not in the MIDX, so this gets run.

As I said in my review of patch 1, apart from my minor comments in this
and the preceding patches, these patches look good to me.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux