From 769feb9fff1ef87c5607fd7a1c4c6b31d7960128 Mon Sep 17 00:00:00 2001 From: Matt Furden Date: Tue, 17 Apr 2012 02:51:29 -0700 Subject: [PATCH] Add GitHub Compare link to Changelog. If the Bundle is hosted on GitHub include link to compare the commit range visually on GitHub. --- autoload/vundle/scripts.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 1d4b185..642f21e 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -35,11 +35,15 @@ endf func! s:create_changelog() abort for bundle in g:updated_bundles + let update_sha = system('cd '.shellescape(bundle.path()).' && git rev-list -1 vundle_update')[0:9] let updates = system('cd '.shellescape(bundle.path()). \ ' && git log --pretty=format:"%s %an, %ar" --graph'. \ ' vundle_update..HEAD') call add(g:vundle_changelog, '') call add(g:vundle_changelog, 'Updated Bundle: '.bundle.name) + if bundle.uri =~ "https://github.com" + call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.update_sha.'...HEAD') + endif for update in split(updates, '\n') let update = substitute(update, '\s\+$', '', '') call add(g:vundle_changelog, ' '.update)