From: Robert Pluim <rpluim@gmail.com>
To: Gregor Zattler <grfz@gmx.de>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 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, 01 Dec 2019 17:37:29 +0100 [thread overview]
Message-ID: <m27e3guhme.fsf@gmail.com> (raw)
In-Reply-To: <87r21oiagi.fsf@len.workgroup> (Gregor Zattler's message of "Sun, 01 Dec 2019 11:53:01 +0100")
>>>>> On Sun, 01 Dec 2019 11:53:01 +0100, Gregor Zattler <grfz@gmx.de> said:
Gregor> Hi Lars,
Gregor> sorry for the delay.
Gregor> * Lars Ingebrigtsen <larsi@gnus.org> [2019-11-24; 22:46]:
>> Gregor Zattler <grfz@gmx.de> 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.
Gregor> I don't have much clue but perhaps this is the wrong thing to do?
Itʼs 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 would 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
prev parent reply other threads:[~2019-12-01 16:37 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
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 [this message]
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=m27e3guhme.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=5344@debbugs.gnu.org \
--cc=grfz@gmx.de \
--cc=larsi@gnus.org \
/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).