{"thread":{"id":"48325","subject":"Git issue report","startedAt":"2018-04-19T03:30:17Z","lastAt":"2018-04-19T05:33:18Z","messageCount":2,"participants":["xfswindy@163.com","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"345057","messageId":"-tc3xop-8i635uwx53zom190jcbwyrl587bgic1u7ogu-h5ta7c-vg7tsu-9tjre9eq72we-wflfrt-v7y1d7-7ekgia-gbrcn9of96to-6fxlag-u56rt19q40x9-ved85k-25erwyma9au4-fjthm4-fwargr.1524108608363@email.android.com","threadId":"48325","inReplyTo":null,"subject":"Git issue report","fromName":"xfswindy@163.com","fromEmail":"xfswindy@163.com","sentAt":"2018-04-19T03:30:08Z","receivedAt":"2018-04-19T03:30:17Z","isPatch":false,"sender":{"key":"xfswindy@163.com","avatar":null},"body":"Hi,\n  I met a issue when using git.\nI cannot delete the file by the commond 'git rm'.\nThe file name is a little diff from common file.\nI accidentally named the file \"filename\\r\", display such as filename^M. Then I commit the file by 'git add .'.\nAfter I find this mistake, I remove the file, then try to use commond \"git rm\" to delete the file, but failed.\n\nMy git version is 1.7.9.5.\nIs this issue reported?\nIf this issue is solved, could you tell me which version I should get.\n\nThanks!\nXiaofeng Chen\n04/19/2018\n\n"},{"id":"345064","messageId":"xmqqbmefep6b.fsf@gitster-ct.c.googlers.com","threadId":"48325","inReplyTo":"-tc3xop-8i635uwx53zom190jcbwyrl587bgic1u7ogu-h5ta7c-vg7tsu-9tjre9eq72we-wflfrt-v7y1d7-7ekgia-gbrcn9of96to-6fxlag-u56rt19q40x9-ved85k-25erwyma9au4-fjthm4-fwargr.1524108608363@email.android.com","subject":"Re: Git issue report","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-04-19T05:33:00Z","receivedAt":"2018-04-19T05:33:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"xfswindy@163.com\" <xfswindy@163.com> writes:\n\n> Hi,\n>   I met a issue when using git.\n> I cannot delete the file by the commond 'git rm'.\n> The file name is a little diff from common file.\n> I accidentally named the file \"filename\\r\", display such as filename^M. Then I commit the file by 'git add .'.\n> After I find this mistake, I remove the file, then try to use commond \"git rm\" to delete the file, but failed.\n>\n> My git version is 1.7.9.5.\n\nThe following works fine with v1.7.9.5 (I have separate installs of\nvarious versions of Git and use \"rungit $version\" to choose from\nthem, so just read \"rungit v1.7.9.5\" below as if it is \"git\").\n\n\t$ rungit v1.7.9.5 init\n        $ N=$(printf \"filename\\015\")\n        $ echo >\"$N\"\n        $ /bin/ls fil* | od -cx\n        0000000   f   i   l   e   n   a   m   e  \\r  \\n\n                   6966    656c    616e    656d    0a0d\n        0000012\n        $ rungit v1.7.9.5 add .\n        $ rungit v1.7.9.5 ls-files\n        \"filename\\r\"\n        $ rm filename*\n        $ rungit v1.7.9.5 rm filename*\n        $ rungit v1.7.9.5 ls-files \n\t$ /bin/ls\n        $ exit\n\nand I do not think of any reason why we would have broken it since.\n\nFYI, you do not have to do a separate \"rm filename*\" in the above\nsequence; \"git rm filename*\" would remove it from both the working\ntree and from the index.  I did it in the above illustration in two\nseparate steps only because you said you removed and then did \"git\nrm\" and I wanted to emulate it.\n\n> Is this issue reported?\n\nI do not recall hearing about it, but you must have looked for one\nhard already and I haven't, so...\n\n> If this issue is solved, could you tell me which version I should get.\n\nIt appears to me that such an issue did not exist in the first\nplace.\n\n"}]}