git-diff not showing changes (corrupt repo?)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Tuesday, October 2, 2007 - 2:55 pm

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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-diff not showing changes (corrupt repo?), Dan Zwell, (Tue Oct 2, 2:55 pm)
Re: git-diff not showing changes (corrupt repo?), Jeff King, (Tue Oct 2, 3:17 pm)
Re: git-diff not showing changes (corrupt repo?), Junio C Hamano, (Tue Oct 2, 3:15 pm)
Re: git-diff not showing changes (corrupt repo?), Dan Zwell, (Tue Oct 2, 11:17 pm)
Re: git-diff not showing changes (corrupt repo?), Linus Torvalds, (Tue Oct 2, 11:44 pm)
Re: git-diff not showing changes (corrupt repo?), Jeff King, (Tue Oct 2, 11:23 pm)
Re: git-diff not showing changes (corrupt repo?), Dan Zwell, (Wed Oct 3, 12:00 am)
Re: git-diff not showing changes (corrupt repo?), Jeff King, (Wed Oct 3, 12:38 am)