Re: [PATCH 1/2] t7700: add tests for `--keep-unreachable`

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> +expect_object_count () {
> +	find .git/objects \( -type d \( -name pack -o -name info \) -prune \) -o -type f -print >objects &&
> +	test_line_count = "$1" objects
> +}

So this is counting "loose" objects.  Do we want to have "loose"
somewhere in its name?

> +expect_object_in_idx () {
> +	git verify-pack -v "$1" >objects &&
> +	test_grep "^$2" objects
> +}

And this one checks if an object exists in a given pack in somewhat
an expensive way.  It can take either .idx or .pack but the name
makes the caller assume it should be called with .idx, which is OK.

Would it achieve the same effect and be faster to do something like

	git show-index <"$1" >objects &&
	test_grep "^[0-9]* $2 (" objects

instead?

Thanks.




[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