From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Date: Sat, 9 Jan 2010 02:49:53 +0100 Message-ID: <20100109014953.GC25574@shi.workgroup> Reply-To: Gregor Zattler , 5344@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263003561 29115 80.91.229.12 (9 Jan 2010 02:19:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2010 02:19:21 +0000 (UTC) Cc: rfrancoise@debian.org To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 09 03:19:13 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NTQv1-0007cU-VI for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jan 2010 03:19:12 +0100 Original-Received: from localhost ([127.0.0.1]:35804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTQv1-0008KL-UE for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jan 2010 21:19:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTQuw-0008K4-1G for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTQuq-0008Hl-MT for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:04 -0500 Original-Received: from [199.232.76.173] (port=50276 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTQup-0008Hd-92 for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:18:59 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38909) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTQuo-0004xx-S7 for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:18:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NTQXe-0001Ye-5Z; Fri, 08 Jan 2010 20:55:02 -0500 X-Loop: bug-gnu-emacs@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: Original-Received: via spool by submit@debbugs.gnu.org id=B.12630020435963 (code B ref -1); Sat, 09 Jan 2010 01:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jan 2010 01:54:03 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-Received: (qmail invoked by alias); 09 Jan 2010 01:50:46 -0000 Original-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 Original-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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -5.9 (-----) Resent-Date: Fri, 08 Jan 2010 20:55:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34096 gmane.emacs.pretest.bugs:25373 Archived-At: 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)