Started moving all libgit2 interaction to repository,c