threads / patch / 7544

patchDistinguish branches by more than case in tests.

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

## tl;dr

8 messages between Apr 6, 2007 and Apr 7, 2007. Diffs are folded; open one to read it.

replies: 7people: 6as markdown or json

Brian Gernhardt· Apr 6, 2007, 05:42 UTC · lore

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(-)
Show changes to t/t3200-branch.sh +3 −3
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
Junio C Hamano· Apr 6, 2007, 21:47 UTC · re: Brian Gernhardt · lore

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

Brian Gernhardt <benji@silverinsanity.com> writes:
Show 7 quoted lines
> 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.
Linus Torvalds· Apr 6, 2007, 22:06 UTC · re: Junio C Hamano · lore

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

On Fri, 6 Apr 2007, Junio C Hamano wrote:
Show 7 quoted lines
> 
> 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
Randal L. Schwartz· Apr 6, 2007, 23:02 UTC · re: Linus Torvalds · lore

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

>>>>> "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!
Bill Lear· Apr 6, 2007, 23:22 UTC · re: Randal L. Schwartz · lore

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

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
Linus Torvalds· Apr 6, 2007, 23:41 UTC · re: Randal L. Schwartz · lore

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

On Fri, 6 Apr 2007, Randal L. Schwartz wrote:
> 
> 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
Bill Lear· Apr 6, 2007, 23:52 UTC · re: Linus Torvalds · lore

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

On Friday, April 6, 2007 at 16:41:08 (-0700) Linus Torvalds writes:
Show 18 quoted lines
>
>
>On Fri, 6 Apr 2007, Randal L. Schwartz wrote:
>> 
>> 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!).

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
Kyle McMartin· Apr 7, 2007, 00:18 UTC · re: Linus Torvalds · lore

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

On Fri, Apr 06, 2007 at 04:41:08PM -0700, Linus Torvalds wrote:
> 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

← back to recent threads