bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2982: 23.0.92; `vc-diff' behaves inconsistently with git


From: Stefan Monnier
Subject: bug#2982: 23.0.92; `vc-diff' behaves inconsistently with git
Date: Mon, 13 Apr 2009 13:58:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

> although, as before, a.txt is unchanged. In a new Emacs instance,
> "C-x v =" again behaves like the first time. git version: 1.6.2.

VC tries to avoid running the backend for "vc-diff" when the file is
unchanged, by keeping track of the file's modtime when the backend (in
this case, git) tells VC that the file is up-to-date.

So when you open the file, Emacs asks `git' the status of the file and
so knows that this modtime corresponds to "up-to-date".  After `touch',
OTOH, Emacs isn't so sure any more, so it runs `git diff' which happens
to output "diff --git a/a.txt b/a.txt".  IIRC if "git diff" didn't
output anything at all, the *vc-diff* window would not be made visible
and VC would have also indicated "No changes between working revision
and workfile", but since "git diff" did output something, VC presumes
that there is some kind of difference (without trying to understand the
actual content of that process output).


        Stefan








reply via email to

[Prev in Thread] Current Thread [Next in Thread]