Create Changelog when performing BundleInstall!
Keeps track of the current commit with a vundle_update tag before perfoming an update and adds all commits pulled in the update to a Changelog accessible via pressing 'u' after BundleInstall! completes.
This commit is contained in:
@@ -204,6 +204,7 @@ func! s:sync(bang, bundle) abort
|
||||
let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
|
||||
let cmd = '"'.cmd.'"' " enclose in quotes
|
||||
endif
|
||||
call s:add_update_tag(a:bundle)
|
||||
else
|
||||
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
|
||||
endif
|
||||
@@ -222,6 +223,7 @@ func! s:sync(bang, bundle) abort
|
||||
return 'todate'
|
||||
end
|
||||
|
||||
call s:add_to_updated_bundle_list(a:bundle)
|
||||
return 'updated'
|
||||
endf
|
||||
|
||||
@@ -229,6 +231,19 @@ func! s:system(cmd) abort
|
||||
return system(a:cmd)
|
||||
endf
|
||||
|
||||
func! s:add_update_tag(bundle) abort
|
||||
call s:system('cd '.shellescape(a:bundle.path()).
|
||||
\ ' && git tag -a vundle_update -m "Last Vundle Update" -f')
|
||||
endfunc
|
||||
|
||||
func! s:add_to_updated_bundle_list(bundle) abort
|
||||
let current_commit = s:system('cd '.shellescape(a:bundle.path()).' && git rev-list HEAD')
|
||||
let initial_commit = s:system('cd '.shellescape(a:bundle.path()).' && git rev-list vundle_update')
|
||||
if (0 == v:shell_error) && (initial_commit != current_commit)
|
||||
call add(g:updated_bundles, a:bundle)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func! s:log(str) abort
|
||||
let fmt = '%y%m%d %H:%M:%S'
|
||||
call add(g:vundle_log, '['.strftime(fmt).'] '.a:str)
|
||||
|
||||
Reference in New Issue
Block a user