Re: [PATCH 2/2] refs: allow skipping OID verification

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

 



"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>
>
> This introduces the REF_SKIP_OID_VERIFICATION flag, which lets the ref-store
> test helper write non-existent or unparsable objects into the ref storage.

Yay.

> diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
> index 658628375c8..f5333196b07 100755
> --- a/t/t1006-cat-file.sh
> +++ b/t/t1006-cat-file.sh
> @@ -452,9 +452,8 @@ test_expect_success 'the --allow-unknown-type option does not consider replaceme
>  	# Create it manually, as "git replace" will die on bogus
>  	# types.
>  	head=$(git rev-parse --verify HEAD) &&
> -	test_when_finished "rm -rf .git/refs/replace" &&
> -	mkdir -p .git/refs/replace &&
> -	echo $head >.git/refs/replace/$bogus_short_sha1 &&
> +	test_when_finished "test-tool ref-store main delete-refs 0 msg refs/replace/$bogus_short_sha1" &&
> +	test-tool ref-store main update-ref msg "refs/replace/$bogus_short_sha1" $head $ZERO_OID 1024 &&

Double yay.  Tests that are independent of backend is indeed much nicer.



[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