Re: [PATCH] t1402-check-ref-format: skip tests of refs beginning with slash on Windows

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

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

> This patch is needed on top of mh/check-ref-format-3, or it could be
> inserted in front of this batch (which probably amounts to the same
> thing :-)

How about applying directly on 'master' then?

> +invalid_ref NOT_MINGW '/'
> ...
> @@ -155,21 +155,21 @@ test_expect_success 'check-ref-format --branch from subdir' '
>  '
>  
>  valid_ref_normalized() {
> -	test_expect_success "ref name '$1' simplifies to '$2'" "
> +	test_expect_success $3 "ref name '$1' simplifies to '$2'" "
>  		refname=\$(git check-ref-format --normalize '$1') &&
>  		test \"\$refname\" = '$2'"
>  }
>  invalid_ref_normalized() {
> -	test_expect_success "check-ref-format --normalize rejects '$1'" "
> +	test_expect_success $2 "check-ref-format --normalize rejects '$1'" "
>  		test_must_fail git check-ref-format --normalize '$1'"
>  }
> ...
> +valid_ref_normalized '/heads/foo' 'heads/foo' NOT_MINGW

The inconsistencies strikes me a bit.

Perhaps update to something like this?

	valid_ref_normalized () {
		if test $# = 3
                then
			prereq=$1
                        shift
		fi
                test_expect_success $prereq "ref name '$1' simplifies to '$2'"
		...
	}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]