libgit2

git_transaction_set_symbolic_target

Version:

Set the target of a reference

Set the target of the specified reference. This reference must be locked.

Signature

int git_transaction_set_symbolic_target(git_transaction *tx, const char *refname, const char *target, const git_signature *sig, const char *msg);

Parameters

In
tx

the transaction

const char *
In
refname

reference to update

const char *
In
target

target to set the reference to

In
sig

signature to use in the reflog; pass NULL to read the identity from the config

const char *
In
msg

message to use in the reflog

Returns

int

0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code

Versions