Get the commit object that is the <n>th generation ancestor of the named commit object, following only the first parents. The returned commit has to be freed by the caller.
Passing 0
as the generation number returns another instance of the
base commit itself.
the requested generation
0 on success; GIT_ENOTFOUND if no matching ancestor exists or an error code