git_tag_create

Create a new tag in the repository from an object

A new reference will also be created pointing to this tag object. If force is true and a reference already exists with the given name, it'll be replaced.

The message will not be cleaned up. This can be achieved through git_message_prettify().

The tag name will be checked for validity. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.

extern (C) nothrow @nogc
int
git_tag_create

Parameters

oid libgit2_d.oid.git_oid*

Pointer where to store the OID of the newly created tag. If the tag already exists, this parameter will be the oid of the existing tag, and the function will return a git_error_code.GIT_EEXISTS error code.

Params:

repo libgit2_d.types.git_repository*

Repository where to store the tag

tag_name const(char)*

Name for the tag; this name is validated for consistency. It should also not conflict with an already existing tag name

target const(libgit2_d.types.git_object)*

Object to which this tag points. This object must belong to the given repo.

tagger const(libgit2_d.types.git_signature)*

Signature of the tagger for this tag, and of the tagging time

message const(char)*

Full message for this tag

force int

Overwrite existing references

Return Value

Type: int

0 on success, git_error_code.GIT_EINVALIDSPEC or an error code A tag object is written to the ODB, and a proper reference is written in the /refs/tags folder, pointing to it

Meta