[PATCH] Distinguish branches by more than case in tests.

Previous thread: [PATCH] Avoid composing too long "References" header. by YOSHIFUJI Hideaki / on Thursday, April 5, 2007 - 4:50 pm. (1 message)

Next thread: [PATCH] rename_ref(): only print a warning when config-file update fails by Lars Hjemli on Friday, April 6, 2007 - 1:33 am. (4 messages)
From: Brian Gernhardt
Date: Thursday, April 5, 2007 - 10:42 pm

The renaming without config test changed a branch from q to Q, which
fails on non-case sensitive file systems.  Change the test to use q
and q2.
---

Notably, HFS+ is not case sensitive.  IIRC there are others.  This isn't
a flaw of git, just a bad choice of branch names for certain systems.

 t/t3200-branch.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index ce2c5f4..3ca1a32 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -85,9 +85,9 @@ test_expect_failure \
 
 mv .git/config .git/config-saved
 
-test_expect_success 'git branch -m q Q without config should succeed' '
-	git-branch -m q Q &&
-	git-branch -m Q q
+test_expect_success 'git branch -m q q2 without config should succeed' '
+	git-branch -m q q2 &&
+	git-branch -m q2 q
 '
 
 mv .git/config-saved .git/config
-- 
1.5.1.32.gdd6cd

-

From: Junio C Hamano
Date: Friday, April 6, 2007 - 2:47 pm

Sigh.

I always wonder why people pay money to buy case insensitive
filesystems (MacOS is not free, is it?).

More mysterious is that there apparently are peole who are paid
to produce such systems (Apple has paid employees to work on
MacOS, doesn't it?).

The worst of all this is that I have to be careful not to break
things on such a system, and take a patch like this (admittedly,
you did the real fixing, so that is less work for me, but
still...).

And puzzlingly enough, I am not paid to do this ;-).

Thanks for the patch.  Will apply.



-

From: Linus Torvalds
Date: Friday, April 6, 2007 - 3:06 pm

It's doubly strange, because:
 - it's basically impossible to do well
 - even *trying* to do it introduces other (even subtler) problems, like 
   locale-dependencies and trying to force some "canonical" encoding.

People who do it tend to universally do it because they haven't thought it 
through, and are supporting some older behaviour. And in the process they 
make their filesystem less reliable *and* slower.

		Linus
-

From: Randal L. Schwartz
Date: Friday, April 6, 2007 - 4:02 pm

>>>>> "Linus" == Linus Torvalds <torvalds@linux-foundation.org> writes:

Linus> People who do it tend to universally do it because they haven't thought
Linus> it through, and are supporting some older behaviour. And in the process
Linus> they make their filesystem less reliable *and* slower.

Just playing the devil's advocate (I prefer the clean filesystem of Unix), the
argument the case-folding fans make is "well, taxes and TAXES is the same
word, right?".

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-

From: Bill Lear
Date: Friday, April 6, 2007 - 4:22 pm

Is "bill" and "Bill" the same word?


Bill
-

From: Linus Torvalds
Date: Friday, April 6, 2007 - 4:41 pm

And "polish" and "Polish" is the same word, right? AnD i cOuLD wRite 
THInGs LiKE thiS, aND it WouLd bE eaSiER tO REad, RiGHt?

Case *does* matter. Anybody who claims otherwise is a total idiot.

And no, e e cummings is not an example to the contrary. Quite the reverse. 
Even people like e e cummings (known for his lack of capitalization) 
actually became well-known exactly because he made capitalization *matter* 
by flouting the rules (the same way he also flouted the rules of grammar 
and other word usage!).

		Linus
-

From: Bill Lear
Date: Friday, April 6, 2007 - 4:52 pm

And, just as you rearrange r-p-o-p-h-e-s-s-a-g-r to get grasshopper,
you would get new filesytems that idiotically, and just as arbitrarily,
considered them the same.


Bill
-

From: Kyle McMartin
Date: Friday, April 6, 2007 - 5:18 pm

Or for a more humorous case that bit me until I reformatted my MacOSX machine
as case-sensitive HFS+, how xt_conntrack.h and xt_CONNTRACK.h are the same
file...

Really makes looking at git-diff output interesting.

Cheers,
	Kyle
-

Previous thread: [PATCH] Avoid composing too long "References" header. by YOSHIFUJI Hideaki / on Thursday, April 5, 2007 - 4:50 pm. (1 message)

Next thread: [PATCH] rename_ref(): only print a warning when config-file update fails by Lars Hjemli on Friday, April 6, 2007 - 1:33 am. (4 messages)