git_branch_set_upstream

Set a branch's upstream branch

This will update the configuration to set the branch named branch_name as the upstream of branch. Pass a NULL name to unset the upstream information.

@note the actual tracking reference must have been already created for the operation to succeed.

extern (C) nothrow @nogc
int
git_branch_set_upstream

Parameters

branch libgit2_d.types.git_reference*

the branch to configure

branch_name const(char)*

remote-tracking or local branch to set as upstream.

Return Value

Type: int

0 on success; GIT_ENOTFOUND if there's no branch named branch_name or an error code

Meta