Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Handle GIT_DIR environment variable #255

Open
jwhitley opened this issue Mar 13, 2020 · 2 comments
Open

Handle GIT_DIR environment variable #255

jwhitley opened this issue Mar 13, 2020 · 2 comments

Comments

@jwhitley
Copy link

Please reconsider support for $GIT_DIR in gina.vim. Concrete use case:

The vcsh tool for versioning $HOME is designed to overlay several managed git repositories on the user's home directory. It works very well. Example:

> echo $GIT_DIR
# nothing
> vcsh vim
# now in a subshell with $GIT_DIR set
> echo $GIT_DIR
/Users/foo/.config/vcsh/repo.d/vim.git
> git status
# ... status of vim repo ...

Only $GIT_DIR is set by vcsh. There are some similar tools that also use $GIT_DIR to manage this style of work.

Related to #130. IMO, I feel like the prior issue overcomplicated things. Fugitive, for example, does handle $GIT_DIR and $GIT_WORK_TREE, but not $GIT_COMMON_DIR. I'm not aware of any user tooling that uses $GIT_COMMON_DIR. I attempted to search GitHub looking for examples, but found only git scripting and git-* tools (outside of git forks).

@lambdalisue
Copy link
Owner

I got. Well now I think it's worth but I'm not using such tools thus I don't have enough motivation to implement it by myself. PRs are welcome 👍

You may need to change code in https://github.com/lambdalisue/gina.vim/blob/master/autoload/vital/__gina__/Git.vim#L17-L66

@jwhitley
Copy link
Author

Thanks! I’ll have a look. 👀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants