From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Date: Sun, 01 Dec 2019 17:37:29 +0100 Message-ID: References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> <20100110223940.GB4845@shi.workgroup> <87imnaoica.fsf@gnus.org> <87wobpfnpq.fsf@len.workgroup> <87y2w5j6bk.fsf@gnus.org> <87r21oiagi.fsf@len.workgroup> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="112649"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Lars Ingebrigtsen , 5344@debbugs.gnu.org To: Gregor Zattler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 01 17:38:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ibSEs-000T91-LZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 17:38:26 +0100 Original-Received: from localhost ([::1]:52980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibSEr-0000Xz-AU for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 11:38:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41934) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibSEV-0000SW-6v for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 11:38:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibSEU-00040J-5m for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 11:38:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibSEU-00040D-2R for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 11:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ibSEU-00078O-0d for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 11:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2019 16:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5344 X-GNU-PR-Package: emacs Original-Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.157521826127381 (code B ref 5344); Sun, 01 Dec 2019 16:38:01 +0000 Original-Received: (at 5344) by debbugs.gnu.org; 1 Dec 2019 16:37:41 +0000 Original-Received: from localhost ([127.0.0.1]:36612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibSE9-00077Y-Hw for submit@debbugs.gnu.org; Sun, 01 Dec 2019 11:37:41 -0500 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:52150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibSE6-00077F-Np for 5344@debbugs.gnu.org; Sun, 01 Dec 2019 11:37:39 -0500 Original-Received: by mail-wm1-f46.google.com with SMTP id g206so19108474wme.1 for <5344@debbugs.gnu.org>; Sun, 01 Dec 2019 08:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=WZItz8OCPWg4CsjPqwgT+Xd1TSqW1/Wjp7Fd7sR1520=; b=Al4lcm7qQCzYdjcVS6H6Kye1YvYMI+Qk9DwQr6SoBipiMBwWwjSTrcyuxmwb0qV8J9 MrlFRin4oa3BsWy+SYwTlEebcsDZtiVuCY/hr2355yyeQm9B3kTS0jd62mnJMWRqdqg7 axkltYNWZKyqf4DoqOMcjtJJvXdIpnlgOF02CUBpNpnxGbtBC8jHq1gW6Uly6EX7nEBw yjZ/lZlk7NvjBgeUPzjCM05fdrsLzL2aaqLEp3XiMrLRcODf7PZXCvg9Ahc1jDCBq3qx Q8hZX+Bhf9zL+GMKgZt4YXg/Ci1yNAVpYGGsuM1pzyw98VgNy8TMsM3VGuE48tIxUvL3 OD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=WZItz8OCPWg4CsjPqwgT+Xd1TSqW1/Wjp7Fd7sR1520=; b=olemLG8rcIONx0enRZ7JUfhCrwXCUQ3M6ZKGLxBdI0bYzNLin3wfksV2xTUNhhkXrO rLh9pwQlRRDxqwFiK58FkjHqhqApbGxukDOI2pcVGkBRuE4GL053Z1qtkdHWBpfoGtqG 2L+2wsUpurDCWEZYXubAA0q1m6DSZE410L8cESrhvlpmSJDyUnnlATuXc1LTxcNqbJkf yZ/u/XWzhwz2hPU2LGwtDNmbrrDyji84rx/MY1rRNmi+Fn4Byr7aC69q4LMLDtUJ5g34 ggOPG1GCJWY+TdBqQlhWt3N0ZmR7/mRQKu7pwDqgyiYqDombXo+UYGeDGzJrFPRnVvbI PFtA== X-Gm-Message-State: APjAAAV5FBlhH1FFuXL6fedltvhGXnrhTdnqXfdsjMa0R268Mna9MXEi Ow6i1QGZQwg9R5gAMsBH0iPLYlSW X-Google-Smtp-Source: APXvYqwH1K1uFayzdvBQCcQDWX2s5Z6Y40zcF4M31n+LC4cXCYkeZWMOZIvkydRheFzXsE14KrTKrA== X-Received: by 2002:a1c:7d92:: with SMTP id y140mr23601248wmc.145.1575218252167; Sun, 01 Dec 2019 08:37:32 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:506d:4d96:a157:aa42]) by smtp.gmail.com with ESMTPSA id c6sm4779232wmb.9.2019.12.01.08.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Dec 2019 08:37:31 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <87r21oiagi.fsf@len.workgroup> (Gregor Zattler's message of "Sun, 01 Dec 2019 11:53:01 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:172716 Archived-At: >>>>> On Sun, 01 Dec 2019 11:53:01 +0100, Gregor Zattler said: Gregor> Hi Lars, Gregor> sorry for the delay. Gregor> * Lars Ingebrigtsen [2019-11-24; 22:46]: >> Gregor Zattler writes: >>> Actually git does it the other way around: It uses the values of >>> the environment variables even if there is a .git directory >>> further up in the file system hierarchy. So it's not a fall >>> back but it overrides the default. >>=20 >> The vc functions in Emacs sets GIT_DIR to "" before calling git, so = in >> vc mode it would be a fallback. Gregor> I don't have much clue but perhaps this is the wrong thing to d= o? It=CA=BCs the right thing to do in the context of vc, where it only supports the directory-based model of repository. Setting GIT_DIR to "" avoids having the environment of the shell where you started emacs messing up VC. >> It seems like providing a simple alist of directories/git repos woul= d do >> the trick in vc-dir, wouldn't it? No. Define a variable that will be used by vc to override what it thinks the current repository is, and then use .dir-locals.el to set it per-directory. Patches welcome :-) Robert