From unknown Fri Jun 13 10:22:05 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Reply-To: Gregor Zattler , 5344@debbugs.gnu.org Mail-Followup-To: Gregor Zattler , 5344@debbugs.gnu.org Resent-From: Gregor Zattler Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jan 2010 01:55:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5344 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@debbugs.gnu.org id=B.12630020435963 (code B ref -1); Sat, 09 Jan 2010 01:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jan 2010 01:54:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTQWg-0001Y8-K1 for submit@debbugs.gnu.org; Fri, 08 Jan 2010 20:54:03 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTQTi-0001WG-CS for submit@debbugs.gnu.org; Fri, 08 Jan 2010 20:51:01 -0500 Received: from mail.gnu.org ([199.232.76.166]:44140 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTQTe-0001uz-QF for emacs-pretest-bug@gnu.org; Fri, 08 Jan 2010 20:50:54 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NTQTb-0005Rm-IW for emacs-pretest-bug@gnu.org; Fri, 08 Jan 2010 20:50:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.0 Received: from mail.gmx.net ([213.165.64.20]:48539) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NTQTa-0005Qt-SF for emacs-pretest-bug@gnu.org; Fri, 08 Jan 2010 20:50:51 -0500 Received: (qmail invoked by alias); 09 Jan 2010 01:50:46 -0000 Received: from p57B9F42E.dip.t-dialin.net (EHLO shi.workgroup) [87.185.244.46] by mail.gmx.net (mp018) with SMTP; 09 Jan 2010 02:50:46 +0100 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX18oXpUGzd0ogmWz06asSDQx3X2Aj5BdDasUSdvm2r 0GwTgb+TUqLwWf Received: from grfz by shi.workgroup with local (Exim 4.71) (envelope-from ) id 1NTQSz-0001LX-EM; Sat, 09 Jan 2010 02:50:13 +0100 Date: Sat, 9 Jan 2010 02:49:53 +0100 From: Gregor Zattler To: emacs-pretest-bug@gnu.org Message-ID: <20100109014953.GC25574@shi.workgroup> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.42 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Fri, 08 Jan 2010 20:54:01 -0500 Cc: rfrancoise@debian.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Dear emacs developers, I use bare git repositories for version contol of some dotfiles.[1] This means that the repository ist *not* in a .git directory which is part of the working directorys hirarchy. Instead the environment variable GIT_DIR indicates the location of the repository and the environment variable GIT_WORK_TREE indicates the working directory. But in emacs/vc these dotfiles do not show up as version controlled, even when the emacs session inherited the correct GIT_* environment variables: ~$ export GIT_DIR=~/.fgits/emacs.git ~$ export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)" ~$ printenv|grep GIT GIT_DIR=/home/grfz/.fgits/emacs.git GIT_WORK_TREE=/home/grfz/.fgits/emacs.git/../../ There are several files/directories under ~/.emacs.d, but *no* .git directory:: ~$ ls .emacs.d/ ~/.emacs.d$ ls -A _abbrev_defs _backup elpa _emms-history history init.el _recentf todo-top _abbrev_defs.old _diary _emacs.bmk games _ido.last lisp _remember_backups update-org.sh auto-save-list elisp _emacs_orig _gnus image-dired .org-id-locations todo-do There is also no ~/.git ~/$ ls -l ~/.git ls: cannot access /home/grfz/.git: No such file or directory but git works fine: cd ~/.emacs.d ~/.emacs.d$ git status # On branch master # Changed but not updated: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in # working directory) # # modified: init.el # no changes added to commit (use "git add" and/or "git commit -a") Or: ~/.emacs.d$ git log -n 1 commit ffa6f03211b7234533d060886614b96ea59c30f0 Author: Gregor Zattler Date: Thu Jan 7 22:38:23 2010 +0100 new german aspell directory name; show max buffer size; minor changes This are the files in ~/.emacs.d which are version controlled: ~/.emacs.d$ git ls-files _abbrev_defs _diary _gnus init.el Now I start emacs: emacs -Q -n and evaluate (getenv "GIT_DIR") this shows "/home/grfz/.fgits/emacs.git" in the echo area, while (getenv "GIT_WORK_TREE") gives "/home/grfz/.fgits/emacs.git/../../" That's o.k. Now I ^X f visit ~/.emacs.d/init.el but no indication that init.el is version controlled shows up in the mode line: -UUU:----F1 init.el Top L1 (Emacs-Lisp)---------------------------------------------------------- Now I type ^X v d (vc-dir), emacs asks VC status for directory: ~/.emacs.d/ when I confirm this, I get the message No VC backend is responsible for /home/grfz/.emacs.d/ in the echo area. vc does not support the specific git feature of detatched repositories. Therefore I file this bugreport / wishlist bug: IMHO vc should support this feature. In order to do so vc should honour the environment variables GIT_DIR and GIT_WORK_TREE respectively and utilize the git ls-files directory. git gives precedence to these environment variables: even if there is a .git directory with reository it will be ignored if the environment variables indicate other locations for repository and working directory. I think vc should behave in the same way. Thanx for your attention, Gregor [1] These "fake bare repos" are created like this: export GIT_DIR=~/.fgits/emacs.git git init --bare git config core.bare false git config core.worktree ../../ git config status.showUntrackedFiles no see http://lists.madduck.net/pipermail/vcs-home/2008-August/000175.html for an explanation of this way of keeping dotfiles under version control. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/23.1.91/etc/DEBUG. In GNU Emacs 23.1.91.1 (i486-pc-linux-gnu, GTK+ Version 2.18.5) of 2010-01-06 on elegiac, modified by Debian (emacs-snapshot package, version 1:20100106-1) Windowing system distributor `The X.Org Foundation', version 11.0.10605000 configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.1.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1.91/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: de_DE.utf8 value of $LC_CTYPE: de_DE.utf8 value of $LC_MESSAGES: POSIX value of $LC_MONETARY: de_DE.utf8 value of $LC_NUMERIC: de_DE.utf8 value of $LC_TIME: de_DE.utf8 value of $LANG: de_DE.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( g e t e n v SPC " G I T _ D I R " ) C-x C-e M-x e m a b r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. "/home/grfz/.fgits/emacs.git" Making completion list... Load-path shadows: /usr/share/emacs/23.1.91/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/23.1.91/site-lisp/emms/tq hides /usr/share/emacs/23.1.91/lisp/emacs-lisp/tq Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs) From unknown Fri Jun 13 10:22:05 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Reply-To: Dan Nicolaescu , 5344@debbugs.gnu.org Mail-Followup-To: Dan Nicolaescu , 5344@debbugs.gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jan 2010 19:30:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5344 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.126306536214215 (code B ref 5344); Sat, 09 Jan 2010 19:30:02 +0000 Received: (at 5344) by debbugs.gnu.org; 9 Jan 2010 19:29:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTgzy-0003hE-7h for submit@debbugs.gnu.org; Sat, 09 Jan 2010 14:29:22 -0500 Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTgzw-0003h9-0N for 5344@debbugs.gnu.org; Sat, 09 Jan 2010 14:29:20 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o09JT9kV028533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jan 2010 11:29:09 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o09JT9QF010981; Sat, 9 Jan 2010 11:29:09 -0800 (PST) Date: Sat, 9 Jan 2010 11:29:09 -0800 (PST) Message-Id: <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Gregor Zattler References: <20100109014953.GC25574@shi.workgroup> In-Reply-To: <20100109014953.GC25574@shi.workgroup> (Gregor Zattler's message of "Sat, 9 Jan 2010 02:49:53 +0100") Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o09JT9kV028533 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.5 (--) Cc: 5344@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Gregor Zattler writes: > Dear emacs developers, > > I use bare git repositories for version contol of some dotfiles.[1] This > means that the repository ist *not* in a .git directory which is part of > the working directorys hirarchy. Instead the environment variable > GIT_DIR indicates the location of the repository and the environment > variable GIT_WORK_TREE indicates the working directory. But in emacs/vc > these dotfiles do not show up as version controlled, even when the emacs > session inherited the correct GIT_* environment variables: > > ~$ export GIT_DIR=~/.fgits/emacs.git > ~$ export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)" > ~$ printenv|grep GIT > GIT_DIR=/home/grfz/.fgits/emacs.git > GIT_WORK_TREE=/home/grfz/.fgits/emacs.git/../../ If you want to add support for this, it's quite likely that the only thing that needs to be changed is the vc-git-root in emacs/lisp/vc-git.el. From unknown Fri Jun 13 10:22:05 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Reply-To: Gregor Zattler , 5344@debbugs.gnu.org Mail-Followup-To: Gregor Zattler , 5344@debbugs.gnu.org Resent-From: Gregor Zattler Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jan 2010 12:17:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5344 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.12631258016074 (code B ref 5344); Sun, 10 Jan 2010 12:17:01 +0000 Received: (at 5344) by debbugs.gnu.org; 10 Jan 2010 12:16:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTwim-0001Zv-Kz for submit@debbugs.gnu.org; Sun, 10 Jan 2010 07:16:41 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NTvu1-000183-Fv for 5344@debbugs.gnu.org; Sun, 10 Jan 2010 06:24:14 -0500 Received: (qmail invoked by alias); 10 Jan 2010 11:24:08 -0000 Received: from p57B9FEE1.dip.t-dialin.net (EHLO shi.workgroup) [87.185.254.225] by mail.gmx.net (mp006) with SMTP; 10 Jan 2010 12:24:08 +0100 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX19a61s8l3haR0m2KfY1RBO5PsAVLIPwqAa2ytYHok 0BlrxU73ugrPlM Received: from grfz by shi.workgroup with local (Exim 4.71) (envelope-from ) id 1NTvtL-0002MS-Pa; Sun, 10 Jan 2010 12:23:31 +0100 Date: Sun, 10 Jan 2010 12:23:11 +0100 From: Gregor Zattler To: Dan Nicolaescu Message-ID: <20100110112311.GA8553@shi.workgroup> References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> User-Agent: Mutt/1.5.20 (2009-06-14) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 X-Spam-Score: -4.3 (----) X-Mailman-Approved-At: Sun, 10 Jan 2010 07:16:39 -0500 Cc: 5344@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---) Hi Dan, * Dan Nicolaescu [09. Jan. 2010]: > Gregor Zattler writes: > > I use bare git repositories for version contol of some dotfiles.[1] This > > means that the repository ist *not* in a .git directory which is part of > > the working directorys hirarchy. Instead the environment variable > > GIT_DIR indicates the location of the repository and the environment > > variable GIT_WORK_TREE indicates the working directory. But in emacs/vc > > these dotfiles do not show up as version controlled, even when the emacs > > session inherited the correct GIT_* environment variables: > > > > ~$ export GIT_DIR=~/.fgits/emacs.git > > ~$ export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)" > > ~$ printenv|grep GIT > > GIT_DIR=/home/grfz/.fgits/emacs.git > > GIT_WORK_TREE=/home/grfz/.fgits/emacs.git/../../ > > If you want to add support for this, it's quite likely that the only > thing that needs to be changed is the vc-git-root in > emacs/lisp/vc-git.el. Sorry I'm not capable to do this. That's the reason I called it a wish list bug. Because of your suggestion I have fiddled around a bit and found a workaround which somehow supports your suggestion:: I initilalised an empty repository ~/.git. Now vc "considers" my whole home directory as potentially version controlled and interacts with git. Git in turn honours the environment variables and voila: many of the vc-commands are working now. Since I do not want to use this ~/.git I did a chmod -R a-w ~/.git in order to prevent accidentially using this repository in stead of one of the detached ones. Thanks for the hint. Gregor From unknown Fri Jun 13 10:22:05 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Reply-To: Gregor Zattler , 5344@debbugs.gnu.org Mail-Followup-To: Gregor Zattler , 5344@debbugs.gnu.org Resent-From: Gregor Zattler Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2010 00:15:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5344 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.126316884512422 (code B ref 5344); Mon, 11 Jan 2010 00:15:02 +0000 Received: (at 5344) by debbugs.gnu.org; 11 Jan 2010 00:14:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NU7v0-0003ED-UX for submit@debbugs.gnu.org; Sun, 10 Jan 2010 19:14:03 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NU6Sj-00025e-Vt for 5344@debbugs.gnu.org; Sun, 10 Jan 2010 17:40:47 -0500 Received: (qmail invoked by alias); 10 Jan 2010 22:40:41 -0000 Received: from p57B9FEE1.dip.t-dialin.net (EHLO shi.workgroup) [87.185.254.225] by mail.gmx.net (mp051) with SMTP; 10 Jan 2010 23:40:41 +0100 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX18KhfEXHBEKqQlXazhyOOUQ354wcYIEG3GxsWiyuo tI6+5gAF+vkBwn Received: from grfz by shi.workgroup with local (Exim 4.71) (envelope-from ) id 1NU6S0-00030E-UY; Sun, 10 Jan 2010 23:40:00 +0100 Date: Sun, 10 Jan 2010 23:39:40 +0100 From: Gregor Zattler To: Dan Nicolaescu Message-ID: <20100110223940.GB4845@shi.workgroup> References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> User-Agent: Mutt/1.5.20 (2009-06-14) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 X-Spam-Score: -3.4 (---) X-Mailman-Approved-At: Sun, 10 Jan 2010 19:14:01 -0500 Cc: 5344@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) tags patch thanks Hi Dan, * Dan Nicolaescu [09. Jan. 2010]: > If you want to add support for this, it's quite likely that the only > thing that needs to be changed is the vc-git-root in > emacs/lisp/vc-git.el. O.K. thanks to your pointer this was really easy. I don't know if there are negative side effects or if it's a complete solution to the problem but it works for me. The patch does not normalize the resulting path, though. Don't know if this is a problem. For instance (vc-git-root "~/.emacs.d/init.el") gives me: "/home/grfz/.fgits/emacs.git/../../" I don't know if other version controll systems have similar means of detaching repository and working directory. Then vc-find-root would perhaps be a better place to patch. But thats beyond me. Thank you *very* much. Now I have to learn how to use emacsclients environment for this purpose instead of the daemon ones. Gregor --- vc-git.el 2010-01-10 22:51:23.000000000 +0100 +++ my-vc-git.el 2010-01-10 23:24:55.000000000 +0100 @@ -777,7 +777,9 @@ (defun vc-git-extra-status-menu () vc-git-extra-menu-map) (defun vc-git-root (file) - (vc-find-root file ".git")) +(if (getenv "GIT_DIR") + (getenv "GIT_WORK_TREE") + (vc-find-root file ".git"))) (defun vc-git-toggle-signoff () (interactive) From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 01:30:37 2010 Received: (at control) by debbugs.gnu.org; 11 Jan 2010 06:30:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUDnQ-0007NB-SJ for submit@debbugs.gnu.org; Mon, 11 Jan 2010 01:30:36 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUDnQ-0007N6-8p for control@debbugs.gnu.org; Mon, 11 Jan 2010 01:30:36 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NUDnM-0006kL-7p; Mon, 11 Jan 2010 01:30:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19274.50568.91996.939279@fencepost.gnu.org> Date: Mon, 11 Jan 2010 01:30:32 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: blue X-Ran: xdUAnM;<\G-zMtQFhLc(UXF5aM}VHJuD{~]3[$`&u0z@3 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) forcemerge 1184 5351 reassign 5350 emacs,cc-mode severity 5344 wishlist From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 06 01:04:57 2019 Received: (at control) by debbugs.gnu.org; 6 Oct 2019 05:04:57 +0000 Received: from localhost ([127.0.0.1]:45481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGyj3-000436-2K for submit@debbugs.gnu.org; Sun, 06 Oct 2019 01:04:57 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:41611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGyj1-00042s-Fa for control@debbugs.gnu.org; Sun, 06 Oct 2019 01:04:55 -0400 Received: by mail-pf1-f180.google.com with SMTP id q7so6377990pfh.8 for ; Sat, 05 Oct 2019 22:04:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ieB1ybS0T2cur1ZuDV8908WnEi7mSHH9gXjiZQwe7l4=; b=jzDaShfxeRRNsuyaE+m24Qdpd6rIxDk7s+1NoxvXT6jRi9d6jePDoi6XRgqXYz5NOf 5k1qBS5ygnnKwgXsevf7y4aiEo+he4rsQP8qKsw99FpFNjzk7sgayepwsDrZj56OOtGJ mNAtJGP1CNypvNTlodxSdaUXzZiLRK3c95wHA2rBte50ebpX79UdXJsslab75Shpw4k0 SrToC1wRZLOG68oY5wvUSahnRb8tBiXGXuMam9OnqMumO6UQprK2EthCgdPp4iglwiHX smlnXrdS68EDFhTCwPvtyDcTBIDxJNV5tViQNOGz1A1+fzjm5Znw+l70sINJuEl9uasC slAA== X-Gm-Message-State: APjAAAXcpvBNDsD7NTjzTafvlNrJhDOUQkVU3RRw3ZN597sGumCMocs5 BB+xmjK/9bnyyPQ0nYru+xJTDnBEpzTSsU7/sNE2Mnmh X-Google-Smtp-Source: APXvYqyAkmHTgCFPIj5o+oRjF6+DdLL/ob6Xz/z1LnZCfgJJc0y81GKX7xOyotjml6+RnZekC8aEqk9c+R+uPjR7a5U= X-Received: by 2002:a65:5802:: with SMTP id g2mr25093051pgr.333.1570338289464; Sat, 05 Oct 2019 22:04:49 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sun, 6 Oct 2019 07:04:38 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 5344 + patch quit Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.180 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 5344 + patch quit Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.180 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 2.0 BLANK_SUBJECT Subject is present but empty tags 5344 + patch quit From unknown Fri Jun 13 10:22:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2019 13:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Gregor Zattler Cc: 5344@debbugs.gnu.org Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.157451424232466 (code B ref 5344); Sat, 23 Nov 2019 13:04:03 +0000 Received: (at 5344) by debbugs.gnu.org; 23 Nov 2019 13:04:02 +0000 Received: from localhost ([127.0.0.1]:55938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYV4u-0008RU-4R for submit@debbugs.gnu.org; Sat, 23 Nov 2019 08:04:01 -0500 Received: from quimby.gnus.org ([95.216.78.240]:35688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYV4h-0008Qv-1q for 5344@debbugs.gnu.org; Sat, 23 Nov 2019 08:03:49 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iYV4Y-0005Uw-3U; Sat, 23 Nov 2019 14:03:36 +0100 From: Lars Ingebrigtsen References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> <20100110223940.GB4845@shi.workgroup> Date: Sat, 23 Nov 2019 14:03:33 +0100 In-Reply-To: <20100110223940.GB4845@shi.workgroup> (Gregor Zattler's message of "Sun, 10 Jan 2010 23:39:40 +0100") Message-ID: <87imnaoica.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregor Zattler writes: > (defun vc-git-root (file) > - (vc-find-root file ".git")) > +(if (getenv "GIT_DIR") > + (getenv "GIT_WORK_TREE") > + (vc-find-root file ".git"))) As far as I can tell by skimming vc-git.el, functionality like this has not been added during the intervening years. The use case it: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ingebrigtsen.no] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gregor Zattler writes: > (defun vc-git-root (file) > - (vc-find-root file ".git")) > +(if (getenv "GIT_DIR") > + (getenv "GIT_WORK_TREE") > + (vc-find-root file ".git"))) As far as I can tell by skimming vc-git.el, functionality like this has not been added during the intervening years. The use case it: > I use bare git repositories for version contol of some dotfiles.[1] This > means that the repository ist *not* in a .git directory which is part of > the working directorys hirarchy. Instead the environment variable > GIT_DIR indicates the location of the repository and the environment > variable GIT_WORK_TREE indicates the working directory. We wouldn't want to add this in the form suggested above, but it does sound like a useful feature, if I understand it correctly. But I don't quite see how you'd tie a specific location to a specific GIT_DIR value, so I don't see how this would work in general. Perhaps fall back on GIT_DIR/GIR_WORK_TREE if vc-git-root returns nil would be reasonable? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 23 08:04:02 2019 Received: (at control) by debbugs.gnu.org; 23 Nov 2019 13:04:02 +0000 Received: from localhost ([127.0.0.1]:55940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYV4z-0008Rb-V6 for submit@debbugs.gnu.org; Sat, 23 Nov 2019 08:04:02 -0500 Received: from quimby.gnus.org ([95.216.78.240]:35702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYV4n-0008R5-4e for control@debbugs.gnu.org; Sat, 23 Nov 2019 08:03:54 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iYV4f-0005V3-CL for control@debbugs.gnu.org; Sat, 23 Nov 2019 14:03:43 +0100 Date: Sat, 23 Nov 2019 14:03:40 +0100 Message-Id: <87h82uoic3.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #5344 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 5344 - patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 5344 - patch quit From unknown Fri Jun 13 10:22:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Nov 2019 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gregor Zattler Cc: 5344@debbugs.gnu.org Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.157469353132693 (code B ref 5344); Mon, 25 Nov 2019 14:53:01 +0000 Received: (at 5344) by debbugs.gnu.org; 25 Nov 2019 14:52:11 +0000 Received: from localhost ([127.0.0.1]:48023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZFik-0008VF-VV for submit@debbugs.gnu.org; Mon, 25 Nov 2019 09:52:11 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZFii-0008V1-TV for 5344@debbugs.gnu.org; Mon, 25 Nov 2019 09:52:09 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iYziK-0001wf-Da; Sun, 24 Nov 2019 22:46:42 +0100 From: Lars Ingebrigtsen References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> <20100110223940.GB4845@shi.workgroup> <87imnaoica.fsf@gnus.org> <87wobpfnpq.fsf@len.workgroup> Date: Sun, 24 Nov 2019 22:46:39 +0100 In-Reply-To: <87wobpfnpq.fsf@len.workgroup> (Gregor Zattler's message of "Sun, 24 Nov 2019 13:44:33 +0100") Message-ID: <87y2w5j6bk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: (Please keep the debbugs address in the Cc header -- otherwise the mail doesn't reach the bug tracker.) 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 bu [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gitlab.com] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) (Please keep the debbugs address in the Cc header -- otherwise the mail doesn't reach the bug tracker.) 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. The vc functions in Emacs sets GIT_DIR to "" before calling git, so in vc mode it would be a fallback. > When I wrote this bug report and later the tiny patch, what I > wanted was to edit dotfiles with emacsclient from the terminal > command line in terminal frames. But in several terminals there > are several shells with possibly different GIT_DIR/GIR_WORK_TREE > environment variables. > > But working with emacsclient there is only one emacs server and > therefore only one pair of GIT_DIR/GIR_WORK_TREE variables. > > To work with git from the command line with emacsclient the > environment variables would have to be frame local. > > This is where I stuck. > > Therefore nowadays I'm back to a single ~/.git directory, not > using the environment variables any more. And I'm working with > magit nowadays. Magit also does not support the > GIT_DIR/GIR_WORK_TREE environment variables. > > There are interesting discussions on this topic here: > https://github.com/magit/magit/issues/2939#issuecomment-271186636 > and here: https://github.com/magit/magit/issues/460 > > These are attempts to solve the pu: > https://gitlab.com/stepnem/vcsh-el > https://github.com/vanicat/magit-vcsh It seems like providing a simple alist of directories/git repos would do the trick in vc-dir, wouldn't it? From unknown Fri Jun 13 10:22:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Resent-From: Gregor Zattler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2019 10:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 5344@debbugs.gnu.org Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.15751975959975 (code B ref 5344); Sun, 01 Dec 2019 10:54:01 +0000 Received: (at 5344) by debbugs.gnu.org; 1 Dec 2019 10:53:15 +0000 Received: from localhost ([127.0.0.1]:35513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibMqo-0002ap-SJ for submit@debbugs.gnu.org; Sun, 01 Dec 2019 05:53:15 -0500 Received: from mout.gmx.net ([212.227.17.21]:46343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibMqm-0002ab-BT for 5344@debbugs.gnu.org; Sun, 01 Dec 2019 05:53:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575197585; bh=nrTdiEYwSb5tZDH0MXDOMNVJCVnRSAMUyMaQ/OMSkB4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=LYC2kFbXoJPcV60q+MzqgyUndzsgUYKKAstNsfKC7pLWpKDWQeup0PmlrT7FeQLiA 4RknWptGrUp2Fdrr2/pojgO3xgCzq1FU6fOqJtaDg4qthEJLFWX536DdKT9D05aJqC dsffjuCBLCVkpbF4nGJ7/WXZql/HmMnTWR/QRjFI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from len.workgroup ([84.185.105.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MtOGU-1hnFGx36Jq-00ut9B; Sun, 01 Dec 2019 11:53:05 +0100 From: Gregor Zattler In-Reply-To: <87y2w5j6bk.fsf@gnus.org> 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> Date: Sun, 01 Dec 2019 11:53:01 +0100 Message-ID: <87r21oiagi.fsf@len.workgroup> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:WC+wF09mBaSN1QuIJ9eF40pkd1UbsMt6WdFiL0YzQBQvLz7YXAm 40dboEq+H32lOGY2Rkqsr8+MheM/Walp/rEbTsTyoJhJG9CG4YCdsd+ZDAi8aQ08IYk0gc2 dgYjMSLcNewUOQCu70BQLafn0WggK+zRCJMbe+ZUWbkS0tv8An8lKWXgPemcJKIbJopC81O nqMgncnVG5zhMVe9aK0xw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:/+Bj9XCmiDY=:gaXHEWa/wnTpO1iWMH12Vz 3nHOm/YLNsltuefjrQw4RzgwiLzXkcfOM7/eCk0eH2OAE4zG7QKhLYOQVSgVDSg95EOYThLIo tz5gsVk1qYMoH8Ql+O/UhN+MKM7CpChQY94Yk5Hq+sYEourf2c/bkCNFPPvR2bzmlfvyEDXU0 q7Pg9at5krECVzYjrbOjJ0slNuSUtiKTW+CP8h/kpX1ldOIlee0mTSf5WPY2RM4dgzA+tJpWV Fe9y8KtIiWg3FPY3xsec+F3Z/M75yuveGlCwleMxOrnSsyTHnNH/t9HhDur3kY7HJiGxT1HZV Tsmd1aa/4LpC4Ip4FMJEorLxsNbm43I5Zo7eHWqVDT3kPH8vmwJ1gBvKoicUVuJh0uulqiW2u emlypNyCG2wO4XCasagzMgib+2NUcOC/N3KeCwi6ZAgMOm9z1D5pfSSE/hEQNoHIJ8bDxdfCQ EwXrh4oaQh+0yJlD/BceoB5S77wHrroB6ix8wHwepMQuQl+GNxPxupk0S+V5+gQ8Cr0P0JrBi xQD1VEetI3Qfd7XlmNeTSd1Own2haD6ucSdbkjgR131uPOsaY7O89Dpnb3Lg18jclHasDYZPt vEy3SpVLR8JeC6BXxtMzwtMJMU2v5QGU2InXvEnXOCKZMpnFPQJqQobEct+PZ043SlLphHXvJ nNCq1s/wGa3jOm4djNVpOu3mXLPKZEicFrgAEbN/eloANOcaWW3STPUMLRjkTGG8Z9wuRkKXJ H4Xu/ggsuQAb7gGd3FTeKkx5pKvtgwBVFGb5gQbUoL88nq0tUktb1/tcGPkLQuUnW+MkVwy8J 6YBIcAr2yZbAWH7YTouXGCruhm9lmYjI1lb6/GY/1OtkEda/UtnXq//uaqhdW6yvVCXtWlHAl pTrv0kgrF9erYvc5lEr/hBEcTmGx7J/ZB/0sUtrXB9I+n8QWnzk0HclWtp/FAX6zfdK3bqcxU smf9w6zBpVABfe8KXVpD02neyHkuXxyLzTKVFdMq7HO1EzHPaoXDbuiGlWnrSVeNLYnbLw1od 6TpD7I2M//m3f2g6qeC2vzQKZdycpDFIu4r3b6cK4fxHTbFxog4KsM/Vq4vHQ2NisARkX86sz PeTnt98S1CBxYDTQixYGqI7KThCKvaVxaB44/4H47J5Jgg2chFcgn9tMJiScqjJMnQMDAePUv Fmb31EMiBzmi3oQ4e2TyzteFFkw36TJIkyT34Tnxx0ZaGT5JCHIJwJTmWfOBwzsIQHNLNttuq YofEGIZw+HrUtQg4cT6otb4Mn3S7Itl8lX+8Juw== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Lars, sorry for the delay. * 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. > > The vc functions in Emacs sets GIT_DIR to "" before calling git, so in > vc mode it would be a fallback. I don't have much clue but perhaps this is the wrong thing to do? >> But working with emacsclient there is only one emacs server and >> therefore only one pair of GIT_DIR/GIR_WORK_TREE variables. >> >> To work with git from the command line with emacsclient the >> environment variables would have to be frame local. >> >> This is where I stuck. >> >> Therefore nowadays I'm back to a single ~/.git directory, not >> using the environment variables any more. And I'm working with >> magit nowadays. Magit also does not support the >> GIT_DIR/GIR_WORK_TREE environment variables. >> >> There are interesting discussions on this topic here: >> https://github.com/magit/magit/issues/2939#issuecomment-271186636 >> and here: https://github.com/magit/magit/issues/460 >> >> These are attempts to solve the pu: >> https://gitlab.com/stepnem/vcsh-el >> https://github.com/vanicat/magit-vcsh > > It seems like providing a simple alist of directories/git repos would do > the trick in vc-dir, wouldn't it? Actually I don't know. Sorry, I'm no help here. Ciao, =2D- Gregor From unknown Fri Jun 13 10:22:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables 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 X-GNU-PR-Keywords: To: Gregor Zattler Cc: Lars Ingebrigtsen , 5344@debbugs.gnu.org Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.157521826127381 (code B ref 5344); Sun, 01 Dec 2019 16:38:01 +0000 Received: (at 5344) by debbugs.gnu.org; 1 Dec 2019 16:37:41 +0000 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 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 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) 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) From: Robert Pluim 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> Gmane-Reply-To-List: yes Date: Sun, 01 Dec 2019 17:37:29 +0100 In-Reply-To: <87r21oiagi.fsf@len.workgroup> (Gregor Zattler's message of "Sun, 01 Dec 2019 11:53:01 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> 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