Handle libgit exception when calling GitRev::GetParentFromHash()

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Handle libgit exception when calling GitRev::GetCommit()

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>