Re: [PATCH] t3411: Fix test 1 for case-insensitive file systems

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

 



Hi,

On Thu, 29 Jan 2009, Junio C Hamano wrote:

> Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx> writes:
> 
> > The call to "git reset --hard B1" failed on case-insensitive file
> > systems (such as the default settings for HFS+) because there was both
> > a tag "B1" and a file "b1".  Adding "--" to the command makes it
> > clear that we mean commit B1.
> >
> > Signed-off-by: Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx>
> > ---
> >  t/t3411-rebase-preserve-around-merges.sh |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/t/t3411-rebase-preserve-around-merges.sh b/t/t3411-rebase-preserve-around-merges.sh
> > index 6533505..e544451 100755
> > --- a/t/t3411-rebase-preserve-around-merges.sh
> > +++ b/t/t3411-rebase-preserve-around-merges.sh
> > @@ -24,7 +24,7 @@ test_expect_success 'setup' '
> >  	test_commit A1 &&
> >  	test_commit B1 &&
> >  	test_commit C1 &&
> > -	git reset --hard B1 &&
> > +	git reset --hard B1 -- &&
> >  	test_commit D1 &&
> >  	test_merge E1 C1 &&
> >  	test_commit F1
> 
> It is not just B1 that is ambiguous, even though that is the only
> ambiguous one this particular test uses.
> 
> If we really wanted to care about case-folding file systems, shouldn't we
> make test_commit shell function a bit more than the downcasing?  How about
> this patch instead?
> 
>  t/test-lib.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git c/t/test-lib.sh w/t/test-lib.sh
> index c1839f7..8066c25 100644
> --- c/t/test-lib.sh
> +++ w/t/test-lib.sh
> @@ -201,7 +201,7 @@ test_tick () {
>  # Both <file> and <contents> default to <message>.
>  
>  test_commit () {
> -	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
> +	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z').t}

Or

	file=${2:-$1.file}

but I was not quite sure about the impact; I might have checked for 
specific filenames.

Brian, if you would have the time to go through the tests if an automatic 
filename was used, that would be smashing!  (We cannot just run the tests 
and look at the failures, as absence of files could be tested; I don't 
remember, debugging zlib/valgrind currently turns my brain into tatties.)

Ciao,
Dscho

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

  Powered by Linux