libgit2

git_annotated_commit_from_fetchhead

Version:

Creates a git_annotated_commit from the given fetch head data. The resulting git_annotated_commit must be freed with git_annotated_commit_free.

Signature

int git_annotated_commit_from_fetchhead(git_annotated_commit **out, git_repository *repo, const char *branch_name, const char *remote_url, const git_oid *id);

Parameters

Out
out

pointer to store the git_annotated_commit result in

In
repo

repository that contains the given commit

const char *
In
branch_name

name of the (remote) branch

const char *
In
remote_url

url of the remote

In
id

the commit object id of the remote branch

Returns

int

0 on success or error code

Versions