Created
June 7, 2012 00:37
-
-
Save mattn/2885753 to your computer and use it in GitHub Desktop.
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
9ee1a32 | |
Data.String: diffidx does not handle multi-byte string. | |
b2bbfdd | |
add modeline (see #21 for the discussion) | |
3bb4cee | |
Fixed detecting case-insensitive system. |
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
function! s:getChanges() | |
let sections = split(join(readfile("Changes"), "\n"), '\n\ze[a-z0-9]\{7}\n') | |
let changes = {} | |
for section in sections | |
let lines = split(section, "\n") | |
let changes[lines[0]] = join( | |
\ map(lines[1:], 'matchstr(v:val, "^\\s*\\zs.*")'), "\n") | |
endfor | |
return changes | |
endfunction | |
function! s:showChanges() | |
let current = fnamemodify(split(glob('autoload/vital/_*'), "\n")[0], ':t') | |
if current != '__latest__' | |
let keys = split(system("git log --format=format:%h"), "\n") | |
let pos = index(keys, current[1:]) | |
if pos != -1 | |
let changes = s:getChanges() | |
for n in range(pos) | |
if has_key(changes, keys[n]) | |
echo keys[n] | |
echo " " changes[keys[n]] | |
endif | |
endfor | |
endif | |
endif | |
endfunction | |
call s:showChanges() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment