all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 11757@debbugs.gnu.org, Michael Albinus <michael.albinus@gmx.de>
Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times)
Date: Sun, 01 Jul 2012 03:38:15 +0400	[thread overview]
Message-ID: <4FEF8DE7.8010103@yandex.ru> (raw)
In-Reply-To: <jwvehowv23k.fsf-monnier+emacs@gnu.org>

On 01.07.2012 3:01, Stefan Monnier wrote:
>> This won't happen in following cases:
>> 1) We switch to revision when the opened file is the same.
>> 2) It doesn't exist there.
>> 3) We just delete it from disk from outside of Emacs.
>> So the file isn't changed, and you see no warning or update, even after you
>> write it to disk from Emacs again.
>
> While that is suboptimal, VC's state is often suboptimal like that.
> The only cases where VC's state is (or at least really should)
> up-to-date is:
> - when it was changed by an explicit VC action.
> - when we need to know the state in order to make an important decision.
> Updating the state in other circumstances is good, but not necessary.
> Improving VC so that the first case is more frequent would actually
> be preferable.

AFAIK, the second case with `vc-git-registered' only occurs in 
`vc-next-action', where it can call `vc-register' if appropriate.

For that to happen, in `vc-deduce-fileset' either (vc-backend 
buffer-file-name) should return nil, or (vc-state ...) - 'unregistered.

So, in all variations on the theme "file unchanged, but not in git index 
anymore" this won't be true, neither with my original patch, nor with 
the currently installed code.

Invalidating property 'git-registered in `vc-deduce-fileset' might fix 
that, but having it know about Git backend is probably not good at all, 
and AFAIK most other backends just detect all states with a single 
process call, including 'unregistered (so they don't call their 
-registered function from -state function).

-- Dmitry





  reply	other threads:[~2012-06-30 23:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  2:12 bug#11757: 24.1.50; vc-git calls `process-file' too many times Dmitry Gutov
     [not found] ` <handler.11757.B.13402450035158.ack@debbugs.gnu.org>
2012-06-26 10:54   ` bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Dmitry Gutov
2012-06-26 12:14     ` Michael Albinus
2012-06-28  0:51       ` Dmitry Gutov
2012-06-29 13:46         ` Michael Albinus
2012-06-29 16:06           ` Dmitry Gutov
2012-06-29 16:40             ` Michael Albinus
2012-06-29 17:03               ` Dmitry Gutov
2012-06-29 17:38                 ` Michael Albinus
2012-06-30  9:03                 ` Michael Albinus
2012-06-30 12:56                   ` Dmitry Gutov
2012-06-30 13:19                     ` Michael Albinus
2012-06-30 17:42                       ` Dmitry Gutov
2012-06-30 18:46                         ` Michael Albinus
2012-06-30 19:14                           ` Dmitry Gutov
2012-07-01  9:58                             ` Michael Albinus
2012-07-01 14:58                               ` Dmitry Gutov
     [not found]                               ` <4FF062D7.7050402@yandex.ru>
     [not found]                                 ` <878vf2sf7q.fsf@gmx.de>
2012-07-02 12:42                                   ` Dmitry Gutov
2012-07-02 12:44                                   ` Dmitry Gutov
2012-07-04 15:10                                     ` Michael Albinus
2012-07-04 16:42                                       ` Dmitry Gutov
2012-07-06 13:44                                         ` Michael Albinus
2012-07-06 15:55                                           ` Dmitry Gutov
     [not found]                                             ` <5000D21F.6080900@yandex.ru>
     [not found]                                               ` <87k3y36gbe.fsf@gmx.de>
     [not found]                                                 ` <50046AD3.1080605@yandex.ru>
     [not found]                                                   ` <87y5min9ad.fsf@gmx.de>
     [not found]                                                     ` <50063692.7080707@yandex.ru>
2012-07-18 14:38                                                       ` Michael Albinus
2012-07-18 17:01                                                         ` Dmitry Gutov
2012-06-30 23:01             ` Stefan Monnier
2012-06-30 23:38               ` Dmitry Gutov [this message]
2012-07-18 14:11 ` bug#11757: Fwd: " Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FEF8DE7.8010103@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=11757@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.