* fix panic when diff * improve code
* move git diff codes from models to services/gitdiff * fix template * fix test * fix template