git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Steffen Prohaska <prohaska@zib.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 3/4] t0050: Set core.ignorecase case to activate case insensitivity
Date: Sun, 11 May 2008 10:10:40 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0805111005260.3330@woody.linux-foundation.org> (raw)
In-Reply-To: <1210522602-4724-3-git-send-email-prohaska@zib.de>



On Sun, 11 May 2008, Steffen Prohaska wrote:
>
> Case insensitive file handling is only active when
> core.ignorecase = true.  Hence, we need to set it to give the tests
> in t0050 a chance to succeed.  Setting core.ignorecase explicitly
> allows to test some aspects of case handling even on case sensitive file
> systems.

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

  parent reply	other threads:[~2008-05-11 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-11 16:16 [PATCH 1/4] git-init: autodetect core.ignorecase Steffen Prohaska
2008-05-11 16:16 ` [PATCH 2/4] t0050: Test " Steffen Prohaska
2008-05-11 16:16   ` [PATCH 3/4] t0050: Set core.ignorecase case to activate case insensitivity Steffen Prohaska
2008-05-11 16:16     ` [PATCH 4/4] t0050: Add test for case insensitive add Steffen Prohaska
2008-05-11 17:10     ` Linus Torvalds [this message]
2008-05-11 16:21 ` [PATCH 0/4] core.ignorecase Steffen Prohaska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0805111005260.3330@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=prohaska@zib.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).