{"thread":{"id":"493","subject":"git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry","startedAt":"2005-05-05T22:37:27Z","lastAt":"2005-05-05T22:58:22Z","messageCount":2,"participants":["Thomas Glanzmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2641","messageId":"20050505223727.GR20994@cip.informatik.uni-erlangen.de","threadId":"493","inReplyTo":null,"subject":"git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-05T22:37:27Z","receivedAt":"2005-05-05T22:37:27Z","isPatch":false,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\nI have trouble with git-diff-cache, because it uses the file from the\nworking directory instead of the cache file if the working directory is\nnewer than the entry in the cache:\n\n\t(faui01) [~/work/git/git] echo 1 > 1\n\t(faui01) [~/work/git/git] ./git-update-cache --add 1\n\t(faui01) [~/work/git/git] ./git-diff-cache -r HEAD\n\t+100644 blob    d00491fd7e5bb6fa28c517a0bb32b8b506539d4d        1\n\t(faui01) [~/work/git/git] echo 2 > 1\n\t(faui01) [~/work/git/git] ./git-diff-cache -r HEAD\n\t+100644 blob    0000000000000000000000000000000000000000        1\n\t(faui01) [~/work/git/git] ./git-diff-cache -p -r HEAD\n\tCreated: 1 (mode:100644)\n\t--- /dev/null\n\t+++ b/1\n\t@@ -0,0 +1 @@\n\t+2\n\nNote this Output is wrong because the '1' get committed, if I call write-tree\n\n\t(faui01) [~/work/git/git] write-tree\n\t5a38ca90309671c5029f32f67e1aba970a4f1e08\n\t(faui01) [~/work/git/git] ./git-ls-tree 5a38ca90309671c5029f32f67e1aba970a4f1e08 | grep 1\\$\n\t100644  blob    d00491fd7e5bb6fa28c517a0bb32b8b506539d4d        1\n\t040000  tree    9823f134bfb89097ce796f931d3efc92aadfcfbf        mozilla-sha1\n\nSame for modification:\n\n\t(faui01) [~/work/git/git] echo 1 >> COPYING\n\t(faui01) [~/work/git/git] update-cache COPYING\n\t(faui01) [~/work/git/git] ./git-diff-cache -r HEAD\n\t*100644->100644 blob    6ff87c4664981e4397625791c8ea3bbb5f2279a3->c17665dc78a012a55b11d083bfa065d8cd2b0df1      COPYING\n\t(faui01) [~/work/git/git] echo 2 >> COPYING\n\t(faui01) [~/work/git/git] ./git-diff-cache -r HEAD\n\t*100644->100644 blob    6ff87c4664981e4397625791c8ea3bbb5f2279a3->0000000000000000000000000000000000000000      COPYING\n\t(faui01) [~/work/git/git] write\n\twrite       write-tree  writevt\n\t(faui01) [~/work/git/git] write-tree\n\ta3f88e4c7c6818ee880d97bf3293ea56fe12c478\n\t(faui01) [~/work/git/git] ./git-ls-tree a3f88e4c7c6818ee880d97bf3293ea56fe12c478 | grep COPYING\\$\n\t100644  blob    c17665dc78a012a55b11d083bfa065d8cd2b0df1        COPYING\n\nIs this behaviour intended? I would like to see that git-diff-cache\ndoesn't even look at the working directory but only operates on the\ncache.\n\nGreetings,\n\tThomas\n"},{"id":"2642","messageId":"20050505225822.GT20994@cip.informatik.uni-erlangen.de","threadId":"493","inReplyTo":"20050505223727.GR20994@cip.informatik.uni-erlangen.de","subject":"Re: git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-05T22:58:22Z","receivedAt":"2005-05-05T22:58:22Z","isPatch":false,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\n\n* Thomas Glanzmann <sithglan@stud.uni-erlangen.de> [050506 00:38]:\n> I have trouble with git-diff-cache, because it uses the file from the\n> working directory instead of the cache file if the working directory is\n> newer than the entry in the cache:\n\n'git-diff-cache -r --cached HEAD' does what I want.\n                   ~~~~~~~~\n\n\tThomas\n"}]}