git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Set core.ignorecase globally
@ 2012-11-02 14:39 Kirill Likhodedov
  2012-11-02 15:03 ` Konstantin Khomoutov
  0 siblings, 1 reply; 4+ messages in thread
From: Kirill Likhodedov @ 2012-11-02 14:39 UTC (permalink / raw)
  To: git

Hi,

Currently, core.ignorecase is set to true on case insensitive system like Windows or Mac on `git init` and `git clone`, and this setting is local to the created/cloned repository.
Here is the man entry:

core.ignorecase
           If true, this option enables various workarounds to enable git to work better on filesystems that are
           not case sensitive, like FAT. For example, if a directory listing finds "makefile" when git expects
           "Makefile", git will assume it is really the same file, and continue to remember it as "Makefile".

           The default is false, except git-clone(1) or git-init(1) will probe and set core.ignorecase true if
           appropriate when the repository is created.

I suggest to set this globally by default when Git is installed, because there is little sense to have this option false on case insensitive systems (it will lead to confusions when renaming a file by changing only the case of letters). 

----------------------------------
Kirill Likhodedov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Set core.ignorecase globally
  2012-11-02 14:39 Set core.ignorecase globally Kirill Likhodedov
@ 2012-11-02 15:03 ` Konstantin Khomoutov
  2012-11-02 15:15   ` Konstantin Khomoutov
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Khomoutov @ 2012-11-02 15:03 UTC (permalink / raw)
  To: Kirill Likhodedov; +Cc: git

On Fri, 2 Nov 2012 18:39:26 +0400
Kirill Likhodedov <Kirill.Likhodedov@jetbrains.com> wrote:

> Currently, core.ignorecase is set to true on case insensitive system
> like Windows or Mac on `git init` and `git clone`, and this setting
> is local to the created/cloned repository.
[...]
> I suggest to set this globally by default when Git is installed,
> because there is little sense to have this option false on case
> insensitive systems (it will lead to confusions when renaming a file
> by changing only the case of letters). 

Case sensitivity is a property of a file system, not the OS.
What if I mount a device with ext3 file system via ext2fsd driver in on
my Windows workstation?  extN have POSIX semantics so it's pointless to
enforce case insensitivity on them.  The same possibly applies to NFS
mounts.

Also note that NTFS (at least by default) is case insensitive but is
case preserving, observe:

C:\tmp>dir /b
foo

C:\tmp>rename foo Foo

C:\tmp>dir /b
Foo

C:\tmp>del fOO

C:\tmp>dir /b

C:\tmp>ver

Microsoft Windows XP [Версия 5.1.2600]

I don't really know what to make out of this, but I'd not change the
defaults until the reasons to do this are not really pressing (and
they're not for now).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Set core.ignorecase globally
  2012-11-02 15:03 ` Konstantin Khomoutov
@ 2012-11-02 15:15   ` Konstantin Khomoutov
  2012-11-02 20:05     ` Torsten Bögershausen
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Khomoutov @ 2012-11-02 15:15 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: Kirill Likhodedov, git

On Fri, 2 Nov 2012 19:03:37 +0400
Konstantin Khomoutov <flatworm@users.sourceforge.net> wrote:

> > Currently, core.ignorecase is set to true on case insensitive system
> > like Windows or Mac on `git init` and `git clone`, and this setting
> > is local to the created/cloned repository.
> [...]
> > I suggest to set this globally by default when Git is installed,
> > because there is little sense to have this option false on case
> > insensitive systems (it will lead to confusions when renaming a file
> > by changing only the case of letters). 
> 
> Case sensitivity is a property of a file system, not the OS.
> What if I mount a device with ext3 file system via ext2fsd driver in
> on my Windows workstation?  extN have POSIX semantics so it's
> pointless to enforce case insensitivity on them.  The same possibly
> applies to NFS mounts.
> 
> Also note that NTFS (at least by default) is case insensitive but is
> case preserving, observe:
[...]

On the other hand, on NTFS, if I unset core.ignorecase or set it to
false locally, `git mv foo Foo` fails to rename a tracked file "foo"
with the "destination file exists" error.  I would say I would expect it
to work under the conditions I've just described.  Not sure if this
thould be considered a bug in Git for Windows or not -- would be great
to hear opinions of the msysgit port developers.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Set core.ignorecase globally
  2012-11-02 15:15   ` Konstantin Khomoutov
@ 2012-11-02 20:05     ` Torsten Bögershausen
  0 siblings, 0 replies; 4+ messages in thread
From: Torsten Bögershausen @ 2012-11-02 20:05 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: Kirill Likhodedov, git

Am 2012-11-02 16:15, schrieb Konstantin Khomoutov:
> On Fri, 2 Nov 2012 19:03:37 +0400
> Konstantin Khomoutov <flatworm@users.sourceforge.net> wrote:
>
>>> Currently, core.ignorecase is set to true on case insensitive system
>>> like Windows or Mac on `git init` and `git clone`, and this setting
>>> is local to the created/cloned repository.
>> [...]
>>> I suggest to set this globally by default when Git is installed,
>>> because there is little sense to have this option false on case
>>> insensitive systems (it will lead to confusions when renaming a file
>>> by changing only the case of letters).
>>
>> Case sensitivity is a property of a file system, not the OS.
>> What if I mount a device with ext3 file system via ext2fsd driver in
>> on my Windows workstation?  extN have POSIX semantics so it's
>> pointless to enforce case insensitivity on them.  The same possibly
>> applies to NFS mounts.
>>
>> Also note that NTFS (at least by default) is case insensitive but is
>> case preserving, observe:
> [...]
>
> On the other hand, on NTFS, if I unset core.ignorecase or set it to
> false locally, `git mv foo Foo` fails to rename a tracked file "foo"
> with the "destination file exists" error.  I would say I would expect it
> to work under the conditions I've just described.  Not sure if this
> thould be considered a bug in Git for Windows or not -- would be great
> to hear opinions of the msysgit port developers.

I once made a patch for git and we concluded that is is not worth
to put that into main git because you always can do:

git mv foo tmp && git mv tmp Foo
or
git mv -f foo Foo

(But use the -f option with care)
/Torsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-02 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 14:39 Set core.ignorecase globally Kirill Likhodedov
2012-11-02 15:03 ` Konstantin Khomoutov
2012-11-02 15:15   ` Konstantin Khomoutov
2012-11-02 20:05     ` Torsten Bögershausen

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 NNTP newsgroup(s).