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 #56 received at 11757 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>>> 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.
Likely, the best option is to call (vc-registered file) after clearing
the file cache. This recomputes the 'vc-backend property as well, what
we want.
Calling (vc-mode-line file) at this point would be for the side-effect
of that function, which is bad in my experience. It would harden
maintenance, 'cause nobody will know why we want to refresh the modeline
at this point.
> 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.
If we use the cache, there will always be a constellation that the cache
is stale due to external operations. As Stefan said, this is mostly
uncritical.
Best regards, Michael.
This bug report was last modified 13 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.