From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: vc-state and unregistered Date: Tue, 19 Apr 2016 11:43:04 +0300 Message-ID: References: <6ok2vyzwf9.fsf@fencepost.gnu.org> <08f70cda-44be-0657-e50a-2b2c80d2c21c@yandex.ru> <87oa9dzgl0.fsf@gmx.de> <87potshczh.fsf@gmx.de> <87bn57otja.fsf_-_@gmx.de> <515b3451-820d-ad50-8c98-d0330a0f4266@yandex.ru> <87lh4arpbg.fsf@gmx.de> <87ega2rodp.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1461055809 5532 80.91.229.3 (19 Apr 2016 08:50:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Apr 2016 08:50:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 19 10:50:07 2016 Return-path: Envelope-to: ged-emacs-devel@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 1asRME-0006B2-KH for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2016 10:50:06 +0200 Original-Received: from localhost ([::1]:54131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asRME-0002AH-4D for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2016 04:50:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asRFW-0005p3-W2 for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:43:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asRFT-0001s0-LN for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:43:10 -0400 Original-Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asRFT-0001rK-Dx for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:43:07 -0400 Original-Received: by mail-wm0-x244.google.com with SMTP id e201so1074488wme.2 for ; Tue, 19 Apr 2016 01:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=7xOnLauzIgK+B1C0p0APR2SDvjSCU4P5KXrzw19JHbM=; b=z130Qg8Y/mB8yrajkWfWqwd/EGZttIIn5zFOPfmzs88VfXHQGl9saAsHDoCrhSaDOQ vLjNMbNEP7HbZOnOr8WLO43Brlv85nLAYrzbFePYo8ZJWvHEiHY/PLNfN/EY3mxjK7mz OQ85/XJ5Pf5/+kfOXAPR0AdSwnG8GtwzBBRoPX22UYiagxWa16ofn4ybhWM0WsQoPaP0 h4RBuHj4tLjnpsYF/KqHE+qEK7jvUPJC0DqbjiTIKVnC+0eVCRhiuAGQL4ACkADTZnRK yh/0bEGUfFDOAgPRH01OZI4aHQZurWAj9j+AFUoaTC0EWH0A3AnYOlKO7aqVpvF/fYd+ r9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7xOnLauzIgK+B1C0p0APR2SDvjSCU4P5KXrzw19JHbM=; b=KIRJ755MEAAbuYvXN7fJXBfoGEFWofDc3jsAD/bXXF4+YFuhXTas3cKRUozB60g+Pj ien9KkZSTfcIyFxt9WcJL9V11bnKem3R1oxGLFY/o7X3lzZGlgHJLogV0Az/USlSs0UV sCAmX+1vI0sVU1lHkW/4lH1HCDQL1APVUXrqRO6ey04UsCgQdJtrzPvv2UxAKOS2bB8D 6VVyNvkItaMocxWAPlM2uY6cXzBUB2A6/CoOL7y7QeoFhZRsy0Ly5cKIoDdN83O2vOU/ uRvXIeWOXpOr5VOaGENBSrIPsfmMuXa0sRXl1FJ27u3RVDkuSwpM7/CNojT23ge20dhn E/3g== X-Gm-Message-State: AOPr4FWspLasyGIJIkax/MhPrcSoxWzl3qGUndTfJMldYdQUNReK4yY6dPlBh7aRsgx5uQ== X-Received: by 10.194.112.167 with SMTP id ir7mr1774254wjb.14.1461055386821; Tue, 19 Apr 2016 01:43:06 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id n3sm68155498wja.6.2016.04.19.01.43.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2016 01:43:06 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <87ega2rodp.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:203090 Archived-At: On 04/19/2016 11:31 AM, Michael Albinus wrote: > The very first line in `vc-state' doesn't make sense for unregistered > files: > > (or (vc-file-getprop file 'vc-state) > > Even if we know that a file is unregistered, and we have set the file > property to nil accordingly, This information isn't used. For > unregistered files, the cached value isn't used, and the file's state is > computed again. That's not really true, try stepping through the function with Edebug, and see for yourself. It does go farther than the first line, but it doesn't call `vc-git-state' or `vc-git-registered' every time. > IOW: if vc-file-getprop returns nil, we don't know what this > means. Either "don't know", because the state hasn't been computed > yet. Or it means "unregistered". That could be fixed with using `none' instead, like `vc-backend' does. Which I've mentioned already. But I'm not convinced we even need to make that effort.