GNU bug report logs -
#5344
23.1.91; bug/wish: vc does not honour GIT_DIR / GIT_WORK_TREE environment variables
Previous Next
Full log
Message #29 received at 5344 <at> debbugs.gnu.org (full text, mbox):
Hi Lars,
sorry for the delay.
* Lars Ingebrigtsen <larsi <at> gnus.org> [2019-11-24; 22:46]:
> Gregor Zattler <grfz <at> 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.
I don't have much clue but perhaps this is the wrong thing to do?
>> But working with emacsclient there is only one emacs server and
>> therefore only one pair of GIT_DIR/GIR_WORK_TREE variables.
>>
>> To work with git from the command line with emacsclient the
>> environment variables would have to be frame local.
>>
>> This is where I stuck.
>>
>> Therefore nowadays I'm back to a single ~/.git directory, not
>> using the environment variables any more. And I'm working with
>> magit nowadays. Magit also does not support the
>> GIT_DIR/GIR_WORK_TREE environment variables.
>>
>> There are interesting discussions on this topic here:
>> https://github.com/magit/magit/issues/2939#issuecomment-271186636
>> and here: https://github.com/magit/magit/issues/460
>>
>> These are attempts to solve the pu:
>> https://gitlab.com/stepnem/vcsh-el
>> https://github.com/vanicat/magit-vcsh
>
> It seems like providing a simple alist of directories/git repos would do
> the trick in vc-dir, wouldn't it?
Actually I don't know. Sorry, I'm no help here.
Ciao,
--
Gregor
This bug report was last modified 5 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.