Re: [PATCH 3/4] t0050: Set core.ignorecase case to activate case insensitivity

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Sunday, May 11, 2008 - 10:10 am

On Sun, 11 May 2008, Steffen Prohaska wrote:

The patch series looks fine to me, but I just wanted to underline the use 
of that "*some*aspects*" part.

On a filesystem that is case sensitive, doing "core.ignorecase = true" 
doesn't magically make git act as if the filesystem was insensitive to 
case. In particular, since the filesystem very much can contain two 
different versions of a filename in different case, git will actually 
notice that, and notice that "CamelCase" and "camelcase" are not 
necessarily the same file.

To emulate case insensitivity on filesyststems that are actually 
sensitive, we could do some tests that do things like

	echo Hello > CamelCase
	ln CamelCase camelcase

and now git will see something that is *closer* to a real case-insensitive 
filesystem: two names that resolve to the same stat information.

It's still obviously not identical (because "readdir()" will get two 
entries), and as such a test that succeeds in a true case-insensitive 
environment will not necessarily work in the above fake kind of situation, 
but at least you can test some cases.

Renaming the same file to a case that is different is also a worthwhile 
thing to try to "emulate" case insensitivity.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] git-init: autodetect core.ignorecase, Steffen Prohaska, (Sun May 11, 9:16 am)
[PATCH 2/4] t0050: Test autodetect core.ignorecase, Steffen Prohaska, (Sun May 11, 9:16 am)
[PATCH 4/4] t0050: Add test for case insensitive add, Steffen Prohaska, (Sun May 11, 9:16 am)
[PATCH 0/4] core.ignorecase, Steffen Prohaska, (Sun May 11, 9:21 am)
Re: [PATCH 3/4] t0050: Set core.ignorecase case to activat ..., Linus Torvalds, (Sun May 11, 10:10 am)