Thanks to visit codestin.com Credit goes to libgit2.org
Lookup a commit object from a repository.
pointer to the looked up commit
the repo to use when locating the commit.
identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.
0 on success; error code otherwise