git_branch_move

Move/rename an existing local branch reference.

The new branch name will be checked for validity. See git_tag_create() for rules about valid names.

Note that if the move succeeds, the old reference object will not + be valid anymore, and should be freed immediately by the user using + git_reference_free().

extern (C) nothrow @nogc
int
git_branch_move

Parameters

out_ libgit2_d.types.git_reference**

New reference object for the updated name.

branch libgit2_d.types.git_reference*

Current underlying reference of the branch.

new_branch_name const(char)*

Target name of the branch once the move is performed; this name is validated for consistency.

force int

Overwrite existing branch.

Return Value

Type: int

0 on success, git_error_code.GIT_EINVALIDSPEC or an error code.

Meta