Allow to use libgit2 for unified diff

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Signed-off-by: Sven Strickroth <email@cs-ware.de>