emacs-devel
[Top][All Lists]
Advanced

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

Re: vc-state-heuristic is gone


From: Eric S. Raymond
Subject: Re: vc-state-heuristic is gone
Date: Mon, 24 Nov 2014 04:49:29 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

David Kastrup <address@hidden>:
> If I get a VC call across an ssh link for every keystroke I make in some
> Tramp-edited buffer because the modeline wants to display the non-cached
> current branch I am on, this is not going to lead to happy editing.

Why do you suppose this could ever occur?  There is not and never has been 
any VC code that fires on an ordinary keystroke - that is, one that is not
bound as a VC command.

The branch field, in particular, would only have to be updated when a
VC operation that could potentially change it is invoked. My guess is
that you have "removing caching" somewhat confused with
"bulletproofing VC against operations going on behind its back".

Removing the ancient caching code is partial hardening against those -
it does eliminate *some* TOCTOU conditions, which as I previously
noted is one reason it's a good idea. But the main goal was to reduce
the complexity of the mode code, not futilely attempt to prevent
*every* potential way that an out-of-VC operation could invalidate
VC's stored state.  That would be a crazy, infeasably expensive thing
to do, and I'm certainly not going to try it.

What my changes do is make the old modes that used to cache a lot of
state approximately as safe as the modern ones that don't, like
git's. That is, VC will behave reasonably in the face of operations
done outside it context *through the ordinary VCS commands*. 

That is, your branch tag display might get stale, but that would be
about the worst of it; VC operations made from an incorrect state will
generally error out harmlessly rather than doing something nasty.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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