git_branch_upstream_name

Get the upstream name of a branch

Given a local branch, this will return its remote-tracking branch information, as a full reference name, ie. "feature/nice" would become "refs/remote/origin/feature/nice", depending on that branch's configuration.

extern (C) nothrow @nogc
int
git_branch_upstream_name

Parameters

out_ libgit2_d.buffer.git_buf*

the buffer into which the name will be written.

repo libgit2_d.types.git_repository*

the repository where the branches live.

refname const(char)*

reference name of the local branch.

Return Value

Type: int

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

Meta