{"thread":{"id":"31386","subject":"git blame shows wrong \"Not commited yet\" entries","startedAt":"2012-08-30T08:26:54Z","lastAt":"2012-09-02T04:23:01Z","messageCount":5,"participants":["Thomas Ackermann","Junio C Hamano","Martin von Zweigbergk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198087","messageId":"303882026.440710.1346315214352.JavaMail.ngmail@webmail08.arcor-online.net","threadId":"31386","inReplyTo":"1055159053.19198.1345536909730.JavaMail.ngmail@webmail24.arcor-online.net","subject":"git blame shows wrong \"Not commited yet\" entries","fromName":"Thomas Ackermann","fromEmail":"th.acker66@arcor.de","sentAt":"2012-08-30T08:26:54Z","receivedAt":"2012-08-30T08:26:54Z","isPatch":false,"sender":{"key":"th.acker@arcor.de","avatar":"https://avatars.githubusercontent.com/u/1358536?v=4"},"body":" \nHi,\n\nI am using MsysGit 1.7.11 on WinXP 32 bit and experience the folllowing strange behaviour:\n \nFor a file like \"File.txt\" in the repo, \"git blame file.txt\" (note the lower case)\nshows \"Not commited yet\" for every single line in the file. \n\"git blame File.txt\" (correct upper case spelling) gives the correct output.\n\"core.ignorecase\" is \"true\" so this behaviour is not what I expected.\n\nIs this a bug in MsysGit or some kind of intended behaviour (or bug) in Git?\n\n\n---\nThomas\n"},{"id":"198127","messageId":"7v7gsgqd4w.fsf@alter.siamese.dyndns.org","threadId":"31386","inReplyTo":"303882026.440710.1346315214352.JavaMail.ngmail@webmail08.arcor-online.net","subject":"Re: git blame shows wrong \"Not commited yet\" entries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-30T21:32:47Z","receivedAt":"2012-08-30T21:32:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Ackermann <th.acker66@arcor.de> writes:\n\n> I am using MsysGit 1.7.11 on WinXP 32 bit and experience the folllowing strange behaviour:\n>  \n> For a file like \"File.txt\" in the repo, \"git blame file.txt\" (note the lower case)\n> shows \"Not commited yet\" for every single line in the file. \n> \"git blame File.txt\" (correct upper case spelling) gives the correct output.\n> \"core.ignorecase\" is \"true\" so this behaviour is not what I expected.\n\nWhat happens when you do this?\n\n\t$ echo garbage >no-such-file-tracked.txt\n        $ git blame no-such-file-tracked.txt\n\nIf you see everything attributed to the working tree file, I _think_\nyou are seeing exactly the same thing.  As far as your repository\nhistory is concerned, \"file.txt\" is never tracked (\"File.txt\" is),\nand when Git asks the contents for \"file.txt\" in the working tree,\nWindows case insensitive filesystem gives it the contents of\n\"File.txt\" instead, all lines in which is initially attributed to\nthe working tree.  When blame tries to pass the blame around to the\ncommit at HEAD and down the history, it never finds \"file.txt\", so\nall the blame is given to this phamtom contents from \"File.txt\"\nWindows gave you as if it were stored in \"file.txt\", which does not\nreally exist.\n\nAn obvious workaround is to say \"git blame File.txt\".  You might be\nable to patch MsysGit so that \"git blame file.txt\" errors out when\nit does not find such a path in the HEAD commit, though.\n"},{"id":"198144","messageId":"1672779223.499907.1346418462641.JavaMail.ngmail@webmail08.arcor-online.net","threadId":"31386","inReplyTo":"7v7gsgqd4w.fsf@alter.siamese.dyndns.org","subject":"Aw: Re: git blame shows wrong \"Not commited yet\" entries","fromName":"Thomas Ackermann","fromEmail":"th.acker66@arcor.de","sentAt":"2012-08-31T13:07:42Z","receivedAt":"2012-08-31T13:07:42Z","isPatch":false,"sender":{"key":"th.acker@arcor.de","avatar":"https://avatars.githubusercontent.com/u/1358536?v=4"},"body":"\nYou are right but as I mentioned in my posting I am using \"core.ignorecase=true\"\nso I expected \"file.txt\" and \"File.txt\" to be treated the same.\n\nThe man-page for git-config says:\n\"core.ignorecase\nIf true, this option enables various workarounds to enable git to work better on filesystems that are not case sensitive, like FAT.\nFor example, if a directory listing finds \"makefile\" when git expects \"Makefile\", git will assume it is really the same file, \nand continue to remember it as \"Makefile\".\"\n\nSo \"various workarounds\" does _not_ mean that _all_ filenames are processed modulo upper/lower case, or?\n\n\n---\nThomas\n"},{"id":"198157","messageId":"7vmx1bndt9.fsf@alter.siamese.dyndns.org","threadId":"31386","inReplyTo":"1672779223.499907.1346418462641.JavaMail.ngmail@webmail08.arcor-online.net","subject":"Re: Aw: Re: git blame shows wrong \"Not commited yet\" entries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-31T17:58:42Z","receivedAt":"2012-08-31T17:58:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Ackermann <th.acker66@arcor.de> writes:\n\n> The man-page for git-config says:\n> \"core.ignorecase\n> If true, this option enables various workarounds to enable git to\n> work better on filesystems that are not case sensitive, like FAT.\n> For example, if a directory listing finds \"makefile\" when git\n> expects \"Makefile\", git will assume it is really the same file,\n> and continue to remember it as \"Makefile\".\"\n>\n> So \"various workarounds\" does _not_ mean that _all_ filenames are\n> processed modulo upper/lower case, or?\n\nKeywords in that paragraph include \"various\" (not all) and \"better\"\n(not perfectly), and the most important one is \"when git expects\".\n\nWhen running \"git add file.txt\" with \"File.txt\" in the index, git\nexpects \"File.txt\", but the ignorecase logic makes git assume they\nare the same, and add content from \"file.txt\" as \"File.txt\".\n\nAnd \"git blame $path\" probably should expect $path is something that\nappear in the tree of HEAD; apparently it does not.\n\nPatches welcome.\n"},{"id":"198221","messageId":"CANiSa6g9Yo5xduqyY7pY-RKhqnLGDPXk6-5c68Hq39=jZFxTqQ@mail.gmail.com","threadId":"31386","inReplyTo":"7vmx1bndt9.fsf@alter.siamese.dyndns.org","subject":"Re: Aw: Re: git blame shows wrong \"Not commited yet\" entries","fromName":"Martin von Zweigbergk","fromEmail":"martinvonz@gmail.com","sentAt":"2012-09-02T04:23:01Z","receivedAt":"2012-09-02T04:23:01Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"On Fri, Aug 31, 2012 at 10:58 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> And \"git blame $path\" probably should expect $path is something that\n> appear in the tree of HEAD; apparently it does not.\n\nThat probably makes sense. For anyone deciding to implement that, note\nthat \"git blame -C [-C [-C]] $path\" should probably not expect the\nsame, so the following still works.\n\ncp COPYING COPY\ngit blame -C -C -C COPY\n\nBtw, why isn't \"-C -C -C\" the same as \"-CCC\"? Should it?\n"}]}