-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unset GIT_CONFIG
during git config
#858
base: master
Are you sure you want to change the base?
Conversation
-f .git/config
from git config
GIT_CONFIG
during git config
@@ -1625,7 +1625,7 @@ class Plugin(object): | |||
self.write(Action.DONE, self.name, result[-1:]) | |||
|
|||
def repo_uri(self): | |||
cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' | |||
cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && unset GIT_CONFIG && git config remote.origin.url' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the unset be done before the first git rev-parse
, I wonder? Could an errant GIT_CONFIG
somehow change how --abbrev-ref
determines the branch name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re my comment, if that's the case, note that that would be an existing bug rather than a problem introduced by this PR. I think this PR could be merged as is.
@@ -2054,7 +2054,7 @@ endfunction | |||
function! s:git_validate(spec, check_branch) | |||
let err = '' | |||
if isdirectory(a:spec.dir) | |||
let result = s:lines(s:system('git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url', a:spec.dir)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to work on all OS?
Yygtt |
Conflicting files plug.vim |
Fixes #470, #834
Related #455, #471
GIT_CONFIG
only affectsgit config
as documented here. Why don't we just unset it, so that:PlugUpdate
works properly whether plugins are installed byvim-plug
orgit submodule
.