GNU bug report logs -
#21383
Static revisions in vc-working-revision
Previous Next
Reported by: Jonathan H <pythonnut <at> gmail.com>
Date: Mon, 31 Aug 2015 00:47:01 UTC
Severity: wishlist
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 09/03/2015 08:34 PM, Jonathan H wrote:
> I though the new implementation of the vc-git mode line doesn't use
> vc-working-revision,
Please look at the definition. vc-working-revision is called once in the
beginning of the function, and again through vc-default-mode-line-string.
Even if we inlined the useful parts of vc-default-mode-line-string
definition, calling vc-git-working-revision instead of
vc-git--symbolic-ref is still inevitable in "detached" [Git] mode.
> True, but you have to check that the cache is invalid somehow. If you
> want to be super correct, a rev-parse is probably the fastest way. I
We err on the side of speed currently, instead of correctness. The file
properties are invalidated during certain operations, like saving or
reverting the buffer.
> suppose it would be pretty fast to check the mtime of the .git directory
> inside emacs and invalidate that when it changes. Although filesystem
> timestamps usually make me nervous, it's probably okay in this instance?
I don't know, but it's probably not too hard to imagine a user with a
terminally slow HDD. Maybe it'll be fast enough anyway, but someone will
have to do a patch, and test.
This bug report was last modified 9 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.