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: Dmitry Gutov
Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times)
Date: Sat, 30 Jun 2012 23:14:18 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 30.06.2012 22:46, Michael Albinus wrote:
Dmitry Gutov <address@hidden> 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.





reply via email to

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