git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug with ignorecase on Git and Cygwin
@ 2017-08-16 11:50 CHEVALLIER Yves
  2017-08-16 12:55 ` Torsten Bögershausen
  0 siblings, 1 reply; 2+ messages in thread
From: CHEVALLIER Yves @ 2017-08-16 11:50 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi, 

On Cygwin, the config value `ignorecase` is set to `true` during `git init` and it is not possible to change the default value using templates. 

The issue was discovered while I was tracking a bunch of source files of a SDK. To track the changes I simply rm all the working directory, unzip the new SDK, then git add . and git commit -am "new sdk". In this process an issue with an assembly file with preprocessing was incorrectly named .s instead of .S. In the next version the correction was made, but Git was unable to detect it. 

That said I've tried to manually change ignorecase from true to false and I still have the issue. Git on Cygwin cannot detect files renamed with a case change. 

Is it a bug?

# It works on Ubuntu

	$ git --version
	git version 1.8.3.1
    $ # To be sure 
    $ git config --global init.templateDir /usr/share/git-core/templates
	$ cat /usr/share/git-core/templates
	# Patched config 
	[core] 
	    dummyvar = true 
		ignorecase = false
		
	$ git init dummy 
	$ cat dummy/.git/config
	# Patched config
	[core]
		ignorecase = false
		dummyvar = true
		repositoryformatversion = 0
		filemode = true
		bare = false
		logallrefupdates = true

# It doesn't work on Cygwin:

	$ git --version
	git version 2.13.2
	$ which git
	/usr/bin/git
    $ # To be sure 
    $ git config --global init.templateDir /usr/share/git-core/templates
	$ cat /usr/share/git-core/templates
	# Patched config 
	[core] 
	    dummyvar = true 
		ignorecase = false		
	$ git init dummy 
	$ cat dummy/.git/config
	# Patched config
	[core]
		ignorecase = true
		dummyvar = false
		repositoryformatversion = 0
		filemode = true
		bare = false
		logallrefupdates = true

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

* Re: Bug with ignorecase on Git and Cygwin
  2017-08-16 11:50 Bug with ignorecase on Git and Cygwin CHEVALLIER Yves
@ 2017-08-16 12:55 ` Torsten Bögershausen
  0 siblings, 0 replies; 2+ messages in thread
From: Torsten Bögershausen @ 2017-08-16 12:55 UTC (permalink / raw)
  To: CHEVALLIER Yves; +Cc: git@vger.kernel.org

On Wed, Aug 16, 2017 at 11:50:47AM +0000, CHEVALLIER Yves wrote:
> Hi, 
> 
> On Cygwin, the config value `ignorecase` is set to `true` during `git init` and it is not possible to change the default value using templates. 
> 
> The issue was discovered while I was tracking a bunch of source files of a SDK. To track the changes I simply rm all the working directory, unzip the new SDK, then git add . and git commit -am "new sdk". In this process an issue with an assembly file with preprocessing was incorrectly named .s instead of .S. In the next version the correction was made, but Git was unable to detect it. 
> 
> That said I've tried to manually change ignorecase from true to false and I still have the issue. Git on Cygwin cannot detect files renamed with a case change. 
> 
> Is it a bug?
> 

The thing is that the underlying file system (under cygwin, Windows in general, or MacOs)  treats a.s the same as a.S
So Git can not do better than the file system.
What you can do:

git mv a.S a.s
git commit

(This can be done by a script)

> # It works on Ubuntu
[]

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

end of thread, other threads:[~2017-08-16 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 11:50 Bug with ignorecase on Git and Cygwin CHEVALLIER Yves
2017-08-16 12:55 ` Torsten Bögershausen

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