git_reference_symbolic_set_target

Create a new reference with the same name as the given reference but a different symbolic target. The reference must be a symbolic reference, otherwise this will fail.

The new reference will be written to disk, overwriting the given reference.

The target name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and and it does not have a reflog.

extern (C) nothrow @nogc
int
git_reference_symbolic_set_target

Parameters

out_ libgit2_d.types.git_reference**

Pointer to the newly created reference

ref_ libgit2_d.types.git_reference*

The reference

target const(char)*

The new target for the reference

log_message const(char)*

The one line long message to be appended to the reflog

Return Value

Type: int

0 on success, git_error_code.GIT_EINVALIDSPEC or an error code

Meta