Skip to content

Changing git executable variable #1656

Answered by tpope
nlinaje asked this question in Q&A
Jan 8, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Fugitive is transitioning away from using the shell and towards invoking the git executable directly. A shell alias won't work. You can get over this particular hurdle with a wrapper script but doubtless there are more ahead. Fugitive does not expect g:fugitive_git_executable to provide its own Git dir and you'll probably just end up confusing it.

My preferred solution would be to make this work:

:Git --git-dir=$HOME/.cfg --work-tree=$HOME

I haven't implemented this because I haven't managed to decipher how --git-dir= and --work-tree= interact with -C and the current working directory, as we rely on those to implement much of Fugitive's functionality.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mikehaertl
Comment options

@mikehaertl
Comment options

@tpope
Comment options

@mikehaertl
Comment options

Answer selected by tpope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants