Change libgit2 version to v0.21.2. Rollback some experimental changes in code