From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregor Zattler 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, 10 Jan 2010 12:23:11 +0100 Message-ID: <20100110112311.GA8553@shi.workgroup> References: <20100109014953.GC25574@shi.workgroup> <201001091929.o09JT9QF010981@godzilla.ics.uci.edu> 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 1263125962 6611 80.91.229.12 (10 Jan 2010 12:19:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jan 2010 12:19:22 +0000 (UTC) Cc: 5344@debbugs.gnu.org To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 10 13:19:14 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 1NTwlF-0000lg-Le for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jan 2010 13:19:13 +0100 Original-Received: from localhost ([127.0.0.1]:49724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTwlF-0004rT-WB for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jan 2010 07:19:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTwlA-0004pq-2M for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2010 07:19:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTwl4-0004ll-N0 for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2010 07:19:07 -0500 Original-Received: from [199.232.76.173] (port=42599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTwl4-0004lf-Kc for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2010 07:19:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43001) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTwl4-0004we-6b for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2010 07:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NTwj7-0001aH-Mj; Sun, 10 Jan 2010 07:17:01 -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: 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: Original-Received: via spool by 5344-submit@debbugs.gnu.org id=B5344.12631258016074 (code B ref 5344); Sun, 10 Jan 2010 12:17:01 +0000 Original-Received: (at 5344) by debbugs.gnu.org; 10 Jan 2010 12:16:41 +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 1NTwim-0001Zv-Kz for submit@debbugs.gnu.org; Sun, 10 Jan 2010 07:16:41 -0500 Original-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 Original-Received: (qmail invoked by alias); 10 Jan 2010 11:24:08 -0000 Original-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 Original-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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -3.7 (---) Resent-Date: Sun, 10 Jan 2010 07:17:01 -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:34158 Archived-At: 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