libgit2

git_branch_upstream

Version:

Return the reference supporting the remote tracking branch, given a local branch reference.

Signature

int git_branch_upstream(git_reference **out, const git_reference *branch);

Parameters

In
out

Pointer where to store the retrieved reference.

In
branch

Current underlying reference of the branch.

Returns

int

0 on success; GIT_ENOTFOUND when no remote tracking reference exists, otherwise an error code.

Versions