{"thread":{"id":"15316","subject":"Stranges with git-diff-index","startedAt":"2008-09-01T09:28:20Z","lastAt":"2008-09-01T10:20:26Z","messageCount":2,"participants":["Сергей Шарыбин","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89378","messageId":"48BBB5B4.9080805@school9.perm.ru","threadId":"15316","inReplyTo":null,"subject":"Stranges with git-diff-index","fromName":"Сергей Шарыбин","fromEmail":"nazgul@school9.perm.ru","sentAt":"2008-09-01T09:28:20Z","receivedAt":"2008-09-01T09:28:20Z","isPatch":false,"sender":{"key":"nazgul@school9.perm.ru","avatar":null},"body":"Hi,\n\nI've found this strange thing in git diff-index. I've got a clear work\ntree (all changes are commited). Then I've changed some files. After\nthis I've run `git diff-index --name-status HEAD` and this command\nshowed me changed files. After this I've undid this changes (I did this\nmyself, not using git-reset or any stuff like this). But when I run this\ncommand again it showed me that this files are still changed. After this\nI've run git-status and it told me that there is nothing to commit. And\nafter this git-diff-index tells me that there is no changed files too.\n\nI think it's not normal.\n\n-- \nWith best regards, Sergey I. Sharybin\n"},{"id":"89393","messageId":"48BBC1EA.6050005@viscovery.net","threadId":"15316","inReplyTo":"48BBB5B4.9080805@school9.perm.ru","subject":"Re: Stranges with git-diff-index","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-09-01T10:20:26Z","receivedAt":"2008-09-01T10:20:26Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Сергей Шарыбин schrieb:\n> I've found this strange thing in git diff-index. I've got a clear work\n> tree (all changes are commited). Then I've changed some files. After\n> this I've run `git diff-index --name-status HEAD` and this command\n> showed me changed files. After this I've undid this changes (I did this\n> myself, not using git-reset or any stuff like this). But when I run this\n> command again it showed me that this files are still changed. After this\n> I've run git-status and it told me that there is nothing to commit. And\n> after this git-diff-index tells me that there is no changed files too.\n> \n> I think it's not normal.\n\nThat's perfectly normal.\n\nLow-level git commands (\"plumbing\", like git diff-index) doesn't look at\nthe file contents, only at the stat information. Next time use 'git diff\n--name-status HEAD'; it wouldn't have reported any changes.\n\n-- Hannes\n"}]}