From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21383: Static revisions in vc-working-revision Date: Thu, 03 Sep 2015 22:20:56 -0400 Message-ID: References: <55E41499.5030501@yandex.ru> <55E5094A.3010108@yandex.ru> <55E59487.1050804@yandex.ru> <55E5CA42.1080005@yandex.ru> <55E5DF1A.9010902@yandex.ru> <55E6D426.10105@yandex.ru> <55E89E83.6000501@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441333364 24527 80.91.229.3 (4 Sep 2015 02:22:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2015 02:22:44 +0000 (UTC) Cc: 21383-done@debbugs.gnu.org, Jonathan H To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 04 04:22:32 2015 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 1ZXgdl-0005xK-GI for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Sep 2015 04:22:09 +0200 Original-Received: from localhost ([::1]:53981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgdl-00047X-2D for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2015 22:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgdi-00047K-4f for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXgde-0005KV-7V for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgde-0005KR-3s for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZXgdd-0002fn-NC for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2015 02:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21383 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21383-done@debbugs.gnu.org id=D21383.144133326110197 (code D ref 21383); Fri, 04 Sep 2015 02:22:01 +0000 Original-Received: (at 21383-done) by debbugs.gnu.org; 4 Sep 2015 02:21:01 +0000 Original-Received: from localhost ([127.0.0.1]:48321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXgce-0002e8-V4 for submit@debbugs.gnu.org; Thu, 03 Sep 2015 22:21:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:49378) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXgcb-0002dx-Lh for 21383-done@debbugs.gnu.org; Thu, 03 Sep 2015 22:20:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AyFgA731xV//rn92hcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fi0SpQCOEFCKCeAEBAQ X-IPAS-Result: A0AyFgA731xV//rn92hcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fi0SpQCOEFCKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162359203" Original-Received: from 104-247-231-250.cpe.teksavvy.com (HELO ceviche.home) ([104.247.231.250]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Sep 2015 22:20:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9654066096; Thu, 3 Sep 2015 22:20:56 -0400 (EDT) In-Reply-To: <55E89E83.6000501@yandex.ru> (Dmitry Gutov's message of "Thu, 3 Sep 2015 22:24:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.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:106139 Archived-At: > That might be viable. But the commands that don't use FILE currently only > need the root, so we could avoid passing the argument in entirely. IIUC those operations are things like `working-revision', which should return values which may depend on the FILE or not, depending on the semantics of the backend. So I don't think we can drop the FILE argument, but we can make it clear that it's OK to ignore it and use default-directory instead. That's why I'm suggesting to pass FILE as a relative file-name. It is slightly delicate, tho, since the vc-root for default-directory may actually be different from the vc-root for (expand-file-name ). > That is true. But could we abandon the current design for all backends? Some > of the older ones still don't have vc-root implemented (because it's > impossible for some of them?), and until it is, vc-state and friends won't > know what to set default-directory to. I don't think we should impose a constraint that default-directory is vc-root. So, backends like Git may still have to find the vc-root from the default-directory (tho in many cases, the underlying executable will do that for us). Stefan