I think this could be made easier by using the git database as a substrate - there's nothing in that that's tied to line-oriented files (maybe the compression algorithms make some assumptions?).
It's the diff-viewing infrastructure that needs to be completely replaced for prose.