Re: [PATCH] t1402-check-ref-format: skip tests of refs beginning with slash on Windows
Johannes Sixt <j.sixt@viscovery.net> 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?
Show 18 quoted lines
> +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_MINGWThe 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'"
...
}