git_branch_upstream

Get the upstream of a branch

Given a reference, this will return a new reference object corresponding to its remote tracking branch. The reference must be a local branch.

@see git_branch_upstream_name for details on the resolution.

extern (C) nothrow @nogc
int
git_branch_upstream

Parameters

out_ libgit2_d.types.git_reference**

Pointer where to store the retrieved reference.

branch const(libgit2_d.types.git_reference)*

Current underlying reference of the branch.

Return Value

Type: int

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

Meta