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: Sat, 05 Sep 2015 11:12:58 -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> <55EA5CB0.9070007@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441466066 8066 80.91.229.3 (5 Sep 2015 15:14:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Sep 2015 15:14:26 +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 Sat Sep 05 17:14:14 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 1ZYFAQ-00051b-GO for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 17:14:10 +0200 Original-Received: from localhost ([::1]:40951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFAQ-00017G-92 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 11:14:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFAM-00016u-3x for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYFAI-0005md-Ti for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:14:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFAI-0005lx-RM for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYFAI-0001rs-AZ for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2015 15:14:02 +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.14414659827096 (code D ref 21383); Sat, 05 Sep 2015 15:14:02 +0000 Original-Received: (at 21383-done) by debbugs.gnu.org; 5 Sep 2015 15:13:02 +0000 Original-Received: from localhost ([127.0.0.1]:50048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYF9K-0001qG-2n for submit@debbugs.gnu.org; Sat, 05 Sep 2015 11:13:02 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64746) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYF9H-0001q0-Hz for 21383-done@debbugs.gnu.org; Sat, 05 Sep 2015 11:13:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AyFgA731xV/xGkpUVcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fi0Sne4FFI4QUIoJ4AQEB X-IPAS-Result: A0AyFgA731xV/xGkpUVcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fi0Sne4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162563915" Original-Received: from 69-165-164-17.dsl.teksavvy.com (HELO ceviche.home) ([69.165.164.17]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Sep 2015 11:12:58 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4A7B466482; Sat, 5 Sep 2015 11:12:58 -0400 (EDT) In-Reply-To: <55EA5CB0.9070007@yandex.ru> (Dmitry Gutov's message of "Sat, 5 Sep 2015 06:08:32 +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:106177 Archived-At: >> 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 >> ). > My problem with that is passing a relative file-name doesn't help any > backend, in any way: if the file-name is relative to the current > default-directory, [ By and large, a file name that's not relative to default-directory is a dead file name. ] Yes, the file names would be relative to default-directory. > functions to bind default-directory. And as long as default-directory is > right, the file-names might as well stay absolute. But that means we pass redundant info, and that's only acceptable if we can make reasonably sure that the two copies are in sync. Using relative file names we don't have the problem of keeping duplicate info in sync. >> 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). > If default-directory is outside of $git_repo, passing a path to a file > inside it to 'git status' doesn't work. So someone still needs to bind > default-directory to somewhere inside it. No, I think that it's perfectly acceptable to say that the Git branch used depends solely on default-directory. So if default-directory is outside of $git_repo, you get what you asked for. Stefan