On this page:
git_  tag_  annotation_  create
git_  tag_  create
git_  tag_  create_  frombuffer
git_  tag_  create_  lightweight
git_  tag_  delete
git_  tag_  dup
git_  tag_  foreach
git_  tag_  free
git_  tag_  id
git_  tag_  list
git_  tag_  list_  match
git_  tag_  lookup
git_  tag_  lookup_  prefix
git_  tag_  message
git_  tag_  name
git_  tag_  owner
git_  tag_  peel
git_  tag_  tagger
git_  tag_  target
git_  tag_  target_  id
git_  tag_  target_  type
8.12

47 Tag🔗ℹ

 (require libgit2/include/tag) package: libgit2

procedure

(git_tag_annotation_create oid    
  repo    
  tag_name    
  target    
  tagger    
  message)  integer?
  oid : oid?
  repo : repository?
  tag_name : string?
  target : object?
  tagger : signature?
  message : string?
Create a new tag in the object database pointing to a git_object

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

procedure

(git_tag_create oid    
  repo    
  tag_name    
  target    
  tagger    
  message    
  force)  integer?
  oid : oid?
  repo : repository?
  tag_name : string?
  target : object?
  tagger : signature?
  message : string?
  force : boolean?
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.

procedure

(git_tag_create_frombuffer oid    
  repo    
  buffer    
  force)  integer?
  oid : oid?
  repo : repository?
  buffer : string?
  force : boolean?
Create a new tag in the repository from a buffer

procedure

(git_tag_create_lightweight oid    
  repo    
  tag_name    
  target    
  force)  integer?
  oid : oid?
  repo : repository?
  tag_name : string?
  target : object?
  force : boolean?
Create a new lightweight tag pointing at a target object

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

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

procedure

(git_tag_delete repo tag_name)  integer?

  repo : repository?
  tag_name : string?
Delete an existing tag reference.

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

procedure

(git_tag_dup source)  tag?

  source : tag?
Create an in-memory copy of a tag. The copy must be explicitly free’d or it will leak.

procedure

(git_tag_foreach repo callback payload)  integer?

  repo : repository?
  callback : git_tag_foreach_cb
  payload : bytes?
Call callback ‘cb’ for each tag in the repository

procedure

(git_tag_free tag)  void?

  tag : tag?
Close an open tag

You can no longer use the git_tag pointer after this call.

IMPORTANT: You MUST call this method when you are through with a tag to release memory. Failure to do so will cause a memory leak.

procedure

(git_tag_id tag)  oid?

  tag : tag?
Get the id of a tag.

procedure

(git_tag_list tag_names repo)  integer?

  tag_names : strarray?
  repo : repository?
Fill a list with all the tags in the Repository

The string array will be filled with the names of the matching tags; these values are owned by the user and should be free’d manually when no longer needed, using git_strarray_free.

procedure

(git_tag_list_match tag_names pattern repo)  integer?

  tag_names : strarray?
  pattern : string?
  repo : repository?
Fill a list with all the tags in the Repository which name match a defined pattern

If an empty pattern is provided, all the tags will be returned.

The string array will be filled with the names of the matching tags; these values are owned by the user and should be free’d manually when no longer needed, using git_strarray_free.

procedure

(git_tag_lookup repo id)  tag?

  repo : repository?
  id : oid?
Lookup a tag object from the repository.

procedure

(git_tag_lookup_prefix repo id len)  tag?

  repo : repository?
  id : oid?
  len : integer?
Lookup a tag object from the repository, given a prefix of its identifier (short id).

procedure

(git_tag_message tag)  string?

  tag : tag?
Get the message of a tag

procedure

(git_tag_name tag)  string?

  tag : tag?
Get the name of a tag

procedure

(git_tag_owner tag)  repository?

  tag : tag?
Get the repository that contains the tag.

procedure

(git_tag_peel tag)  object?

  tag : tag?
Recursively peel a tag until a non tag git_object is found

The retrieved tag_target object is owned by the repository and should be closed with the git_object_free method.

procedure

(git_tag_tagger tag)  signature?

  tag : tag?
Get the tagger (author) of a tag

procedure

(git_tag_target tag)  object?

  tag : tag?
Get the tagged object of a tag

This method performs a repository lookup for the given object and returns it

procedure

(git_tag_target_id tag)  oid?

  tag : tag?
Get the OID of the tagged object of a tag

procedure

(git_tag_target_type tag)  git_otype

  tag : tag?
Get the type of a tag’s tagged object