From: Junio C Hamano Date: Thu, 30 Aug 2012 21:32:47 GMT Subject: Re: git blame shows wrong "Not commited yet" entries Message-ID: <7v7gsgqd4w.fsf@alter.siamese.dyndns.org> In-Reply-To: <303882026.440710.1346315214352.JavaMail.ngmail@webmail08.arcor-online.net> Thomas Ackermann writes: > I am using MsysGit 1.7.11 on WinXP 32 bit and experience the folllowing strange behaviour: > > For a file like "File.txt" in the repo, "git blame file.txt" (note the lower case) > shows "Not commited yet" for every single line in the file. > "git blame File.txt" (correct upper case spelling) gives the correct output. > "core.ignorecase" is "true" so this behaviour is not what I expected. What happens when you do this? $ echo garbage >no-such-file-tracked.txt $ git blame no-such-file-tracked.txt If you see everything attributed to the working tree file, I _think_ you are seeing exactly the same thing. As far as your repository history is concerned, "file.txt" is never tracked ("File.txt" is), and when Git asks the contents for "file.txt" in the working tree, Windows case insensitive filesystem gives it the contents of "File.txt" instead, all lines in which is initially attributed to the working tree. When blame tries to pass the blame around to the commit at HEAD and down the history, it never finds "file.txt", so all the blame is given to this phamtom contents from "File.txt" Windows gave you as if it were stored in "file.txt", which does not really exist. An obvious workaround is to say "git blame File.txt". You might be able to patch MsysGit so that "git blame file.txt" errors out when it does not find such a path in the HEAD commit, though.