From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Date: Sun, 01 Jul 2012 11:58:28 +0200 Message-ID: <87pq8f4xbv.fsf@gmx.de> References: <4FE2832A.1030308@yandex.ru> <4FE994E8.9020605@yandex.ru> <87zk7qs21q.fsf@gmx.de> <4FEBAAAA.3030102@yandex.ru> <87d34igrie.fsf@gmx.de> <4FEDD2A0.3010300@yandex.ru> <878vf66pgw.fsf@gmx.de> <4FEDDFD8.1010407@yandex.ru> <87wr2pgoiy.fsf@gmx.de> <4FEEF763.2060806@yandex.ru> <878vf5544d.fsf@gmx.de> <4FEF3A87.6000904@yandex.ru> <874nps63ki.fsf@gmx.de> <4FEF500A.9060103@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341136783 23358 80.91.229.3 (1 Jul 2012 09:59:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2012 09:59:43 +0000 (UTC) Cc: 11757@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 11:59:43 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SlGwO-0002p3-IW for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 11:59:40 +0200 Original-Received: from localhost ([::1]:46132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlGwN-0003a2-9x for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 05:59:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlGwI-0003ZP-UY for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:59:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlGwH-0002LG-67 for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:59:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlGwH-0002LC-2k for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:59:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SlH0b-00036o-Li for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 06:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jul 2012 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11757-submit@debbugs.gnu.org id=B11757.134113699011890 (code B ref 11757); Sun, 01 Jul 2012 10:04:01 +0000 Original-Received: (at 11757) by debbugs.gnu.org; 1 Jul 2012 10:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:39846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlGzl-00035i-59 for submit@debbugs.gnu.org; Sun, 01 Jul 2012 06:03:09 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:46983) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SlGzi-00035b-Nd for 11757@debbugs.gnu.org; Sun, 01 Jul 2012 06:03:07 -0400 Original-Received: (qmail invoked by alias); 01 Jul 2012 09:58:35 -0000 Original-Received: from p57BB9D39.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.157.57] by mail.gmx.net (mp029) with SMTP; 01 Jul 2012 11:58:35 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19kio4c5ltkSnoXIe5UfxB/4QRa2CY0sP76MDkOPE Rf5kGrcbqKOgvl In-Reply-To: <4FEF500A.9060103@yandex.ru> (Dmitry Gutov's message of "Sat, 30 Jun 2012 23:14:18 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61456 Archived-At: Dmitry Gutov 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.