I use git for a slightly unusual purpose--it stores my text as I write fiction. (I know, I know...geeky.)
I am trying to keep track of productivity, and want to measure the degree of difference between subsequent commits. The writer's proxy for "work" is "words written", at least during the creation stage. I can't use straight word count as it ignores editing and compression, both vital parts of writing. I think I want to track:
(words added)+(words removed)
Create a script to ignore most of the unnecessary arguments that
git-diff provides and pass them to
wdiff. Save the following as
~/wdiff.py or something similar and make it executable.
#!/usr/bin/python import sys import os os.system('wdiff -s3 "%s" "%s"' % (sys.argv, sys.argv))
git to use it.
git config --global diff.external ~/wdiff.py git diff filename