GNU bug report logs -
#11757
24.1.50; vc-git calls `process-file' too many times
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Thu, 21 Jun 2012 02:17:02 UTC
Severity: normal
Found in version 24.1.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 11757 <at> debbugs.gnu.org (full text, mbox):
On 30.06.2012 22:46, Michael Albinus wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> This way, `vc-before-save' clears 'vc-backend property too and
>> (vc-backend file) retuns nil in `vc-after-save', and the mode-line
>> isn't getting updated.
>
> So we might let-bind the 'vc-backend property to a local variable, and
> reset it after cleanup.
It would work, but this, yet again, complicates the logic.
>> I'm not sure what we should do. Call (vc-mode-line) anyway? That would work.
>
> Nope. This is expansive, because it recomputes `vc-working-revision'. We
> would loose all improvements from using the cache.
I don't think so.
If we hadn't reset all properties in vc-before-save (file existed),
nothing changes.
If we did reset them, then yes, vc-working-revision will recompute
'vc-working-revision property, but only once after the reset.
Which is what we want to do anyway, since the file's state has changed,
and the working revision could have changed as well, so we need to know
them to update mode-line.
By the way, this last patch I sent doesn't help if the user just removed
the file from repository while leaving it on disk (git rm --cached ...
&& git commit ..., for example), but whatever.
This bug report was last modified 12 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.