This python script is awesome.

I wanted to be able to line up several versions of the same file line by line through time to see what had changed from one version to the next commit... and the commit after that, and the commit after... Those kinds of changes are hard to eyeball with the standard git log -p, which just spits it all out like it's on a giant roll of dot matrix printer paper.

This python script calls git and displays the last N number of revisions in vimdiff... which is awesome. Admittedly it's all command-line stuff, though you could change to make it gvim if you wanted, I'd imagine, and it's stuck in vim, whose diff is a little, well, stodgy, but all in all, a perfect fix to a bothersome problem.

There's some room to improve, (I added...

if N > 4:
COMMAND = 'vim -O'

... already, and will probably add a --range option to let you pick the 3rd through 7th versions of a file, eg)

but this is a great tool for visualizing files stored in git.

Labels: , ,