Re: [PATCH 1/2] repack: teach --no-prune-packed to skip `git prune-packed`

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

 



> The `git repack -d` command will remove any packfile that becomes
> redundant after repacking, and then call  `git pruned-packed` for
> pruning any unpacked objects.

s/pruned-packed/prune-packed/ (note that there is no "d" after "prune")
throughout this commit message.

Also, if there are any objects pruned, they are packed objects, not
unpacked objects. Maybe better to say "...for pruning any objects
already in packs".

> diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
> index 25b235c063..728a16ad97 100755
> --- a/t/t7700-repack.sh
> +++ b/t/t7700-repack.sh
> @@ -127,12 +127,7 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
>  	git reset --hard HEAD^ &&
>  	test_tick &&
>  	git reflog expire --expire=$test_tick --expire-unreachable=$test_tick --all &&
> -	# The pack-objects call on the next line is equivalent to
> -	# git repack -A -d without the call to prune-packed
> -	git pack-objects --honor-pack-keep --non-empty --all --reflog \
> -	    --unpack-unreachable </dev/null pack &&
> -	rm -f .git/objects/pack/* &&
> -	mv pack-* .git/objects/pack/ &&
> +	git repack -A -d --no-prune-packed &&

This is great!

> +test_expect_success '-A -d and --no-prune-packed do not remove loose objects' '
> +	test_create_repo repo &&
> +	test_when_finished "rm -rf repo" &&
> +	test_commit -C repo commit &&
> +	git -C repo repack -A -d --no-prune-packed &&
> +	git -C repo count-objects -v >out &&
> +	grep "^prune-packable: 3" out
> +'

As for the test description, I would prefer "...do not remove loose
objects already in packs".



[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