From 52ab424372ffe2219dd4d054aa1ee803e71ab2e1 Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Fri, 25 Aug 2017 10:02:57 +0200 Subject: [PATCH 1/2] Adds vundle-before-update tag to unbreak plugins Sometimes plugins break after update. In those cases it's difficult to restore the plugin to its previous version. With this commit Vundle will create a tag (`vundle-before-update`) which keeps track of the commit used before an update. This makes it easy to go back to use the previous version. --- autoload/vundle/installer.vim | 1 + doc/vundle.txt | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 472271a3..0112fa8d 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -407,6 +407,7 @@ func! s:make_sync_command(bang, bundle) abort let cmd_parts = [ \ 'cd '.vundle#installer#shellesc(a:bundle.path()), + \ 'git tag -f vundle-before-update', \ 'git pull', \ 'git submodule update --init --recursive', \ ] diff --git a/doc/vundle.txt b/doc/vundle.txt index 81a5f66f..87f3f6ba 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -277,6 +277,16 @@ To update specific plugins, write their names separated by space: or > :PluginUpdate vim-surround vim-fugitive +The command `git tag` will be used to tag the commit that was used before any +update (i.e. before `git pull` is run). The tag is named +`vundle-before-update`. If a plugin breaks after update, go to its directory +and run + + `git checkout vundle-before-update && \` + `git submodule update --init --recursive` + +Then mark it as 'pinned' in `.vimrc`. + 3.5 SEARCHING PLUGINS ~ *vundle-plugins-search* *:PluginSearch* > From 6242b7f7c1fbd29e492d69f9d62d8e2c2fd0794d Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Wed, 23 Oct 2019 12:09:30 +0200 Subject: [PATCH 2/2] Makes vundle-before-update tag vundle- This way we can have multiple backups. --- autoload/vundle/installer.vim | 2 +- doc/vundle.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 0112fa8d..6a4be506 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -407,7 +407,7 @@ func! s:make_sync_command(bang, bundle) abort let cmd_parts = [ \ 'cd '.vundle#installer#shellesc(a:bundle.path()), - \ 'git tag -f vundle-before-update', + \ 'git tag -f vundle-'.strftime('%Y%m%d-%H%M'), \ 'git pull', \ 'git submodule update --init --recursive', \ ] diff --git a/doc/vundle.txt b/doc/vundle.txt index 87f3f6ba..82f2582c 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -278,11 +278,11 @@ or > :PluginUpdate vim-surround vim-fugitive The command `git tag` will be used to tag the commit that was used before any -update (i.e. before `git pull` is run). The tag is named -`vundle-before-update`. If a plugin breaks after update, go to its directory -and run +update (i.e. before `git pull` is run). The tag is named `update-` +(today's date and time). If a plugin breaks after update, go to its +directory, check for the latest tag using `git tag` and run - `git checkout vundle-before-update && \` + `git checkout vundle- && \` `git submodule update --init --recursive` Then mark it as 'pinned' in `.vimrc`.