* 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
* Re: git-diff not showing changes (corrupt repo?)
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-02 19:17 ` Jeff King
1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2007-10-02 19:15 UTC (permalink / raw)
To: Dan Zwell; +Cc: git
Dan Zwell <dzwell@gmail.com> writes:
> ... 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.
This part is most interesting. They are both about comparing
two commits and do not interact with anything in the work tree
nor your index.
> I have tried git versions 1.5.1.6-1.5.3.3, and they all act the same,
Do you mean 1.5.1.5 was Ok? Can you bisect it?
> so I think the repository is corrupt. Does sound familiar to anybody?
Not to me; and I do not think repository is corrupt from the two
"HEAD^ vs HEAD" diff. There is something entirely different
going on.
> ... 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.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
2007-10-02 18:55 git-diff not showing changes (corrupt repo?) Dan Zwell
2007-10-02 19:15 ` Junio C Hamano
@ 2007-10-02 19:17 ` Jeff King
1 sibling, 0 replies; 8+ messages in thread
From: Jeff King @ 2007-10-02 19:17 UTC (permalink / raw)
To: Dan Zwell; +Cc: git
On Tue, Oct 02, 2007 at 01:55:16PM -0500, Dan Zwell wrote:
> 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
Perhaps you are confused by the fact that "git-diff" with no options
shows the difference between the index and the working tree? Did you try
"git-diff --cached"?
> 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.
That doesn't seem right. Can you reproduce this, or at least show us the
command you used?
> $ 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
> $
OK, that does seem wrong. If you run git-diff-files, does it produce the
expected output?
-Peff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
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 3:44 ` Linus Torvalds
0 siblings, 2 replies; 8+ messages in thread
From: Dan Zwell @ 2007-10-03 3:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Martin Waitz, Jeff King
Junio C Hamano wrote:
> Dan Zwell <dzwell@gmail.com> writes:
>
>> ... 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.
>
> This part is most interesting. They are both about comparing
> two commits and do not interact with anything in the work tree
> nor your index.
>
> ... Can you bisect it?
>
I bisected twice to be sure, and have CC'd Martin Waitz on this (the
issue is that some of my changes in a local repo are not being displayed
by git-diff, either before or after they are committed, but git-status,
git-whatchanged, and git-diff-tree all see that changes have been
committed, and git-diff-files does see uncommitted changes).
e88ee2915493213ea0d0be64c542c090fefd4b33 is first bad commit
commit e88ee2915493213ea0d0be64c542c090fefd4b33
Author: Martin Waitz <tali@admingilde.org>
Date: Tue Oct 10 21:16:25 2006 +0200
paginate git-diff by default
I discovered this problem on my 64 bit machine, but the problem does not
occur on my 32 bit machine. That is not the only difference between the
two computers, but it seems the most obvious culprit. The 64 bit machine
may have different libraries than the other, as they are running
different distros.
I noticed that this is a rather old (and very small) patch, and I don't
quite understand how it could cause this problem. I could not revert the
patch to fix the problem. I placed a stripped down version of the
repository here: http://zwell.net/git-error.tar.gz. The problem is very
easy to observe on my machine, though it looks like some machines do not
exhibit it. What else can I do to help?
Dan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
2007-10-03 3:17 ` Dan Zwell
@ 2007-10-03 3:23 ` Jeff King
2007-10-03 4:00 ` Dan Zwell
2007-10-03 3:44 ` Linus Torvalds
1 sibling, 1 reply; 8+ messages in thread
From: Jeff King @ 2007-10-03 3:23 UTC (permalink / raw)
To: Dan Zwell; +Cc: Junio C Hamano, git, Martin Waitz
On Tue, Oct 02, 2007 at 10:17:41PM -0500, Dan Zwell wrote:
> e88ee2915493213ea0d0be64c542c090fefd4b33 is first bad commit
> commit e88ee2915493213ea0d0be64c542c090fefd4b33
> Author: Martin Waitz <tali@admingilde.org>
> Date: Tue Oct 10 21:16:25 2006 +0200
>
> paginate git-diff by default
The only thing this patch does is run the pager, so presumably git-diff
_is_ generating output, but calling the pager is broken for some reason.
What is the value of $GIT_PAGER and $PAGER on the broken and working
machines? Can you confirm that the pager works on both machines?
> I discovered this problem on my 64 bit machine, but the problem does not
> occur on my 32 bit machine. That is not the only difference between the two
> computers, but it seems the most obvious culprit. The 64 bit machine may
> have different libraries than the other, as they are running different
> distros.
I couldn't reproduce on my 32-bit or 64-bit machine (the former running
Debian unstable, the latter Debian stable). But given the patch you
bisected to, I think it is more likely that your pager is broken on the
64-bit machine.
-Peff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
2007-10-03 3:17 ` Dan Zwell
2007-10-03 3:23 ` Jeff King
@ 2007-10-03 3:44 ` Linus Torvalds
1 sibling, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2007-10-03 3:44 UTC (permalink / raw)
To: Dan Zwell; +Cc: Junio C Hamano, git, Martin Waitz, Jeff King
On Tue, 2 Oct 2007, Dan Zwell wrote:
>
> I bisected twice to be sure, and have CC'd Martin Waitz on this (the issue is
> that some of my changes in a local repo are not being displayed by git-diff,
> either before or after they are committed, but git-status, git-whatchanged,
> and git-diff-tree all see that changes have been committed, and git-diff-files
> does see uncommitted changes).
>
> e88ee2915493213ea0d0be64c542c090fefd4b33 is first bad commit
You most likely have a very buggy "less".
Try this:
echo hello | less -FRSX
on the command line. Do you see the "hello"?
(The above is assuming you haven't set GIT_PAGER, PAGER or the LESS
variables manually to something else)
Linus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
2007-10-03 3:23 ` Jeff King
@ 2007-10-03 4:00 ` Dan Zwell
2007-10-03 4:38 ` Jeff King
0 siblings, 1 reply; 8+ messages in thread
From: Dan Zwell @ 2007-10-03 4:00 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git, Martin Waitz, Linus Torvalds
Jeff King wrote:
> On Tue, Oct 02, 2007 at 10:17:41PM -0500, Dan Zwell wrote:
>
>> e88ee2915493213ea0d0be64c542c090fefd4b33 is first bad commit
>> commit e88ee2915493213ea0d0be64c542c090fefd4b33
>> Author: Martin Waitz <tali@admingilde.org>
>> Date: Tue Oct 10 21:16:25 2006 +0200
>>
>> paginate git-diff by default
>
> The only thing this patch does is run the pager, so presumably git-diff
> _is_ generating output, but calling the pager is broken for some reason.
> What is the value of $GIT_PAGER and $PAGER on the broken and working
> machines? Can you confirm that the pager works on both machines?
>
You're absolutely right, my pager was being called and exiting. My
system configuration must be dodgy, because "echo hi | less
--quit-if-one-screen" does not display anything unless it in run in
"screen". But that's not git's fault, and I just need different options,
for now. Thanks a lot for helping me solve this.
Dan
>
> -Peff
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-diff not showing changes (corrupt repo?)
2007-10-03 4:00 ` Dan Zwell
@ 2007-10-03 4:38 ` Jeff King
0 siblings, 0 replies; 8+ messages in thread
From: Jeff King @ 2007-10-03 4:38 UTC (permalink / raw)
To: Dan Zwell; +Cc: Junio C Hamano, git, Martin Waitz, Linus Torvalds
On Tue, Oct 02, 2007 at 11:00:16PM -0500, Dan Zwell wrote:
> You're absolutely right, my pager was being called and exiting. My system
> configuration must be dodgy, because "echo hi | less --quit-if-one-screen"
> does not display anything unless it in run in "screen". But that's not git's
This is obviously getting into less debugging (about which I know
little), but it's possible that you have a bogus TERM setting.
> fault, and I just need different options, for now. Thanks a lot for helping
> me solve this.
Thank you for providing such helpful details. It really makes a
difference.
-Peff
^ 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).