git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-diff not showing changes (corrupt repo?)
@ 2007-10-02 18:55 Dan Zwell
  2007-10-02 19:15 ` Junio C Hamano
  2007-10-02 19:17 ` Jeff King
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Zwell @ 2007-10-02 18:55 UTC (permalink / raw)
  To: git

Hi,
A small personal git repository has started lying to me about changed 
files. git-diff sometimes tells me that the index has no changes from 
HEAD, while other commands (git-status, at least) seem to tell the 
truth. It is the same after I commit the new changes--at that point, 
"git-diff-tree HEAD^ HEAD -p" spits out a nice patch, but "git-diff 
HEAD^ HEAD" gives nothing.

I have tried git versions 1.5.1.6-1.5.3.3, and they all act the same, so 
I think the repository is corrupt. Does sound familiar to anybody? If 
this is user error (for example, "git-reset --hard HEAD^" on a branch 
that had already been pulled into another branch), I can restore from a 
recent backup and redo some changes, but I would like to help 
troubleshoot this behavior if it is a git bug. Is this a known behavior? 
git-fsck doesn't reveal anything amiss, besides dangling objects. Does 
anybody know anything about this situation or what can cause it?


Example of behavior:

$ git status
# On branch bak_linear-checks3
nothing to commit (working directory clean)
$ echo "test" >> Makefile
$ git status
# On branch bak_linear-checks3
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   Makefile
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git diff
$

Thanks,
Dan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-10-03  4:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 18:55 git-diff not showing changes (corrupt repo?) Dan Zwell
2007-10-02 19:15 ` Junio C Hamano
2007-10-03  3:17   ` Dan Zwell
2007-10-03  3:23     ` Jeff King
2007-10-03  4:00       ` Dan Zwell
2007-10-03  4:38         ` Jeff King
2007-10-03  3:44     ` Linus Torvalds
2007-10-02 19:17 ` Jeff King

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).