Skip to contentSkip to conversation

Distinguish branches by more than case in tests.

PATCH In review Brian Gernhardt 6 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Distinguish branches by more than case in tests.

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(-)
t/t3200-branch.sh +3 -3
index ce2c5f4..3ca1a32 100755
@@ -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
Signature · 1 line
1.5.1.32.gdd6cd
#1 lore raw
Quoted 7 lines · Brian Gernhardt

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.

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.

#2 lore raw
Quoted 7 lines · Junio C Hamano

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?).

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

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Linus" == Linus Torvalds <[email protected]> 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?".

Signature · 4 lines
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <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!
#4 lore raw
Quoted 4 lines · On Friday, April 6, 2007 at 16:02:59 (-0700) Randal L. Schwartz writes:

...
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?".

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

Bill

#5 lore raw
In reply to Randal L. Schwartz
Quoted 4 lines · Randal L. Schwartz

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?".

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

#6 lore raw
Quoted 11 lines · On Friday, April 6, 2007 at 16:41:08 (-0700) Linus Torvalds writes:
Quoted 4 lines · Randal L. Schwartz

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?".

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

Quoted 7 lines

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!).

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

#7 lore raw
In reply to Linus Torvalds
Quoted 3 lines · Linus Torvalds

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

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