* git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry
@ 2005-05-05 22:37 Thomas Glanzmann
2005-05-05 22:58 ` Thomas Glanzmann
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Glanzmann @ 2005-05-05 22:37 UTC (permalink / raw)
To: GIT
Hello,
I have trouble with git-diff-cache, because it uses the file from the
working directory instead of the cache file if the working directory is
newer than the entry in the cache:
(faui01) [~/work/git/git] echo 1 > 1
(faui01) [~/work/git/git] ./git-update-cache --add 1
(faui01) [~/work/git/git] ./git-diff-cache -r HEAD
+100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 1
(faui01) [~/work/git/git] echo 2 > 1
(faui01) [~/work/git/git] ./git-diff-cache -r HEAD
+100644 blob 0000000000000000000000000000000000000000 1
(faui01) [~/work/git/git] ./git-diff-cache -p -r HEAD
Created: 1 (mode:100644)
--- /dev/null
+++ b/1
@@ -0,0 +1 @@
+2
Note this Output is wrong because the '1' get committed, if I call write-tree
(faui01) [~/work/git/git] write-tree
5a38ca90309671c5029f32f67e1aba970a4f1e08
(faui01) [~/work/git/git] ./git-ls-tree 5a38ca90309671c5029f32f67e1aba970a4f1e08 | grep 1\$
100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 1
040000 tree 9823f134bfb89097ce796f931d3efc92aadfcfbf mozilla-sha1
Same for modification:
(faui01) [~/work/git/git] echo 1 >> COPYING
(faui01) [~/work/git/git] update-cache COPYING
(faui01) [~/work/git/git] ./git-diff-cache -r HEAD
*100644->100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3->c17665dc78a012a55b11d083bfa065d8cd2b0df1 COPYING
(faui01) [~/work/git/git] echo 2 >> COPYING
(faui01) [~/work/git/git] ./git-diff-cache -r HEAD
*100644->100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3->0000000000000000000000000000000000000000 COPYING
(faui01) [~/work/git/git] write
write write-tree writevt
(faui01) [~/work/git/git] write-tree
a3f88e4c7c6818ee880d97bf3293ea56fe12c478
(faui01) [~/work/git/git] ./git-ls-tree a3f88e4c7c6818ee880d97bf3293ea56fe12c478 | grep COPYING\$
100644 blob c17665dc78a012a55b11d083bfa065d8cd2b0df1 COPYING
Is this behaviour intended? I would like to see that git-diff-cache
doesn't even look at the working directory but only operates on the
cache.
Greetings,
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry
2005-05-05 22:37 git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry Thomas Glanzmann
@ 2005-05-05 22:58 ` Thomas Glanzmann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Glanzmann @ 2005-05-05 22:58 UTC (permalink / raw)
To: GIT
Hello,
* Thomas Glanzmann <sithglan@stud.uni-erlangen.de> [050506 00:38]:
> I have trouble with git-diff-cache, because it uses the file from the
> working directory instead of the cache file if the working directory is
> newer than the entry in the cache:
'git-diff-cache -r --cached HEAD' does what I want.
~~~~~~~~
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-05 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-05 22:37 git-diff-cache uses checked-out-working-directory-files if files are newer than the cache entry Thomas Glanzmann
2005-05-05 22:58 ` Thomas Glanzmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).