Skip to content
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

Do not inject git:: to url when git 2.3.0 or above found #168

Merged
merged 1 commit into from
Feb 15, 2015

Conversation

junegunn
Copy link
Owner

Related: #161
/cc @bruno-

This commit takes advantage of $GIT_TERMINAL_PROMPT variable added in git 2.3.0. So if the git installed on the system is 2.3.0 or above, vim-plug will not use git:: hack to prevent user prompt. However, the downside of the current implementation is that it runs git --version command on startup which should increase the startup time by a little.

@junegunn
Copy link
Owner Author

There are two alternatives that come to mind:

  1. Defer setting up URI until it's needed. However, this requires some changes in g:plugs structure.
  2. Remove git:: part from uri using string substitution before update/install.

@junegunn
Copy link
Owner Author

Implemented the second method. (We may need to revert the value of GIT_TERMINAL_PROMPT though.)

junegunn added a commit that referenced this pull request Feb 15, 2015
Do not inject `git::` to url when git 2.3.0 or above found
@junegunn junegunn merged commit 925ec7b into master Feb 15, 2015
@junegunn junegunn deleted the git-no-prompt branch February 15, 2015 12:06
@bruno-
Copy link

bruno- commented Feb 15, 2015

Hi @junegunn,
👍
Much more elegant code than if I had submitted a pull request.
Also, I updated vim-plug locally and tested it a bit and things seem to work fine.

@junegunn
Copy link
Owner Author

@bruno- Thanks. I appreciate your feedback!

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

Successfully merging this pull request may close these issues.

2 participants