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 12:23:11 +0100 [thread overview]
Message-ID: <20100110112311.GA8553@shi.workgroup> (raw)
In-Reply-To: <201001091929.o09JT9QF010981@godzilla.ics.uci.edu>
Hi Dan,
* Dan Nicolaescu <dann@ics.uci.edu> [09. Jan. 2010]:
> Gregor Zattler <grfz@gmx.de> 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
next prev parent reply other threads:[~2010-01-10 11:23 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 [this message]
2010-01-10 22:39 ` Gregor Zattler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100110112311.GA8553@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).