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

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

bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too man


From: Michael Albinus
Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times)
Date: Sat, 30 Jun 2012 11:03:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 29.06.2012 20:40, Michael Albinus wrote:
>>>> A stale cache is bad, of course. We must carefully check, where a cached
>>>> value has to be invalidated. But why should vc-working-revision being
>>>> invalidated after saving? It is still the same, I believe. Switching to
>>>> another branch shall be observed by Emacs, 'cause there is another
>>>> version of the file on the disk, and Emacs warns you before editing.
>>>
>>> This won't happen in following cases:
>>> 1) We switch to revision when the opened file is the same.
>>> 2) It doesn't exist there.
>>> 3) We just delete it from disk from outside of Emacs.
>>> So the file isn't changed, and you see no warning or update, even
>>> after you write it to disk from Emacs again.
>>
>> I see. Maybe we find a hook, where we could invalidate the vc cache when
>> a file is written which does not exist on the disk?
>
> (vc-before-save) might be the place to do that.

In vc-after-save, vc-git-state is called. Wouldn't it be sufficient to
invalidate the cache there, when it detects that the file is not up-to-date?

Best regards, Michael.





reply via email to

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