vim-gina icon indicating copy to clipboard operation
vim-gina copied to clipboard

Handle GIT_DIR environment variable

Open jwhitley opened this issue 4 years ago • 2 comments

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).

jwhitley avatar Mar 13 '20 17:03 jwhitley

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

lambdalisue avatar Mar 16 '20 01:03 lambdalisue

Thanks! I’ll have a look. 👀

jwhitley avatar Mar 16 '20 04:03 jwhitley