From: Gregor Zattler <grfz@gmx.de>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 5344@debbugs.gnu.org
Subject: bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables
Date: Sun, 10 Jan 2010 23:39:40 +0100 [thread overview]
Message-ID: <20100110223940.GB4845@shi.workgroup> (raw)
In-Reply-To: <201001091929.o09JT9QF010981@godzilla.ics.uci.edu>
tags patch
thanks
Hi Dan,
* Dan Nicolaescu <dann@ics.uci.edu> [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)
next prev parent reply other threads:[~2010-01-10 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 1:49 bug#5344: 23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables Gregor Zattler
2010-01-09 19:29 ` Dan Nicolaescu
2010-01-10 11:23 ` Gregor Zattler
2010-01-10 22:39 ` Gregor Zattler [this message]
2019-11-23 13:03 ` Lars Ingebrigtsen
[not found] ` <87wobpfnpq.fsf@len.workgroup>
2019-11-24 21:46 ` Lars Ingebrigtsen
2019-12-01 10:53 ` Gregor Zattler
2019-12-01 16:37 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100110223940.GB4845@shi.workgroup \
--to=grfz@gmx.de \
--cc=5344@debbugs.gnu.org \
--cc=dann@ics.uci.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.