-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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_DIR to unmess git calls. Fix #807. #808
Open
shippy
wants to merge
36
commits into
VundleVim:next
Choose a base branch
from
shippy:next
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vundle manipulates plugin folders by `cd`-ing into them and calling git via `call system(cmd)`. This doesn't work if GIT_DIR is set as a global environmental variable (most commonly by a git hook). Since there is no use case in which Vundle should respect GIT_DIR, this PR preemptively precedes all git calls with `unset GIT_DIR; `. This makes the git calls behave as expected without unsetting GIT_DIR in the environment beyond vim.
Notes:
|
- closes VundleVim#281
The command `silent pedit ...` was causing trouble if the user had `set hidden`. Now we `bdelete` the changelog buffer before editing it anew.
The variable is script local to autoload/vundle/scripts.vim since VundleVim#468.
These variables only occur in one file each. By making them script local variables this is "documented" in the code. At the same time the global namespace is polluted less. Changed: g:bundle_names -> s:bundle_names g:vundle_last_status -> s:last_status g:vundle_log_file -> s:log_file g:vundle_view -> s:view
If it was loaded, unload the log buffer before editing it. Otherwise the editing command can "hang" if the user has `set hidden`. This problem was originally discovered with the VundleChangelog command and the analogous fix was applied in 7d9b10. See github issue VundleVim#468 for more.
All global variables that are not part of the public API (mentioned in the documentation) are turned into autoload variables. This is intended to give all global variables defined by Vundle.vim a common prefix. The variable g:default_git_proto is part of the public API and is therefor not changed. This is the only exception. Changed: g:bundle_dir -> vundle#bundle_dir g:bundles -> vundle#bundles g:updated_bundles -> vundle#updated_bundles g:vundle_lazy_load -> vundle#lazy_load g:vundle_log -> vundle#log Unchanged: g:default_git_proto
The setting of the default values for the autoload variables is moved out of any function. One reason being that these settings do not depend on the argument of the function. The second being that Vim will source the autoload script if an undefined autoload variable is referenced and the file is expected to define the variable (see :help autoload).
Plugins' names which contain '../', '$HOME', '%:h:h', '..\', etc. can be dangerous. Use a sensible whitelist for plugin names and prevent its expansion.
Saves a 301 redirect and removes a tad bit of confusion when `git clone`-ing Vundle when installing.
buffers will not persist after they're closed.
incorrect URL and updated references to ':Bundle' commands to ':Plugin' commands
This is done based on the simplified Chinese version at commit 232cb92. Traditional Chinese is used by people in Taiwan, Hong Kong and Macao.
They are added by Notepad on M$ Windows.
A traditional Chinese version of the updated `README_ZH_CN.md`.
Fix typo
A traditional Chinese version of the updated `README_ZH_CN.md`.
* Updates readme to use github markdown checkmarks
According to this discussion VundleVim#713 this plugin is simply an example, but the example seems to consistently break the installation process. If this is the case better to remove it. Another example of it causing problems: VundleVim#784
shell=/bin/bash needs to start with `set` in order to actually make vim+fish work correctly.
...nevermind, not ready to merge - this breaks Vundle on Windows, as there's no |
@shippy Thanks for this information it is valuable and appreciated 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vundle manipulates plugin folders by
cd
-ing into them and calling git viacall system(cmd)
. This doesn't work if GIT_DIR is set as a global environmental variable (most commonly by a git hook). Since there is no use case in which Vundle should respect GIT_DIR, this PR preemptively precedes all git calls withunset GIT_DIR;
. This makes the git calls behave as expected without unsetting GIT_DIR in the environment beyond vim.See #807 for the kinds of problems that happen otherwise.