Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 15, 2011, 05:36 UTC
- Message-ID
- <7vwrc6x1cp.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1318632815-29945-3-git-send-email-patthoyts@users.sourceforge.net>
Pat Thoyts <patthoyts@users.sourceforge.net> writes:
> t/t1402-check-ref-format.sh | 15 +++++++++------
Didn't we see a different patch that attempts to address the same issue recently on the list from J6t, or is this a fix for a different problem?
Show 44 quoted lines
> 1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
> index 710fcca..1a5e343 100755
> --- a/t/t1402-check-ref-format.sh
> +++ b/t/t1402-check-ref-format.sh
> @@ -36,7 +36,7 @@ invalid_ref 'refs///heads/foo'
> valid_ref 'refs///heads/foo' --normalize
> invalid_ref 'heads/foo/'
> invalid_ref '/heads/foo'
> -valid_ref '/heads/foo' --normalize
> +test_have_prereq MINGW || valid_ref '/heads/foo' --normalize
> invalid_ref '///heads/foo'
> valid_ref '///heads/foo' --normalize
> invalid_ref './foo'
> @@ -120,9 +120,12 @@ invalid_ref "$ref" --allow-onelevel
> invalid_ref "$ref" --refspec-pattern
> invalid_ref "$ref" '--refspec-pattern --allow-onelevel'
> invalid_ref "$ref" --normalize
> -valid_ref "$ref" '--allow-onelevel --normalize'
> -invalid_ref "$ref" '--refspec-pattern --normalize'
> -valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
> +if test_have_prereq NOT_MINGW
> +then
> + valid_ref "$ref" '--allow-onelevel --normalize'
> + invalid_ref "$ref" '--refspec-pattern --normalize'
> + valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
> +fi
>
> test_expect_success "check-ref-format --branch @{-1}" '
> T=$(git write-tree) &&
> @@ -166,10 +169,10 @@ invalid_ref_normalized() {
>
> valid_ref_normalized 'heads/foo' 'heads/foo'
> valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'
> -valid_ref_normalized '/heads/foo' 'heads/foo'
> +test_have_prereq MINGW || valid_ref_normalized '/heads/foo' 'heads/foo'
> valid_ref_normalized '///heads/foo' 'heads/foo'
> invalid_ref_normalized 'foo'
> -invalid_ref_normalized '/foo'
> +test_have_prereq MINGW || invalid_ref_normalized '/foo'
> invalid_ref_normalized 'heads/foo/../bar'
> invalid_ref_normalized 'heads/./foo'
> invalid_ref_normalized 'heads\foo'