Skip to content

Latest commit

 

History

History
293 lines (227 loc) · 7.86 KB

File metadata and controls

293 lines (227 loc) · 7.86 KB
layout default
menu_item api
title Tag
description Version 0.19.0
return_to
API Documentation Index
/api/
sections
annotationCreate create createLightweight delete list listMatch lookup lookupPrefix #dup #free #id #message #name #owner #peel #tagger #target #targetId #targetType
#annotationCreate
#create
#createLightweight
#delete
#list
#listMatch
#lookup
#lookupPrefix
#dup
#free
#id
#message
#name
#owner
#peel
#tagger
#target
#targetId
#targetType

Tag.annotationCreate Async

Tag.annotationCreate(repo, tag_name, target, tagger, message).then(function(oid) {
  // Use oid
});
Parameters Type
repo Repository Repository where to store the tag
tag_name String Name for the tag
target Object Object to which this tag points. This object must belong to the given repo.
tagger Signature Signature of the tagger for this tag, and of the tagging time
message String Full message for this tag
Returns
Oid the OID of the
newly created tag

Tag.create Async

Tag.create(repo, tag_name, target, tagger, message, force).then(function(oid) {
  // Use oid
});
Parameters Type
repo Repository Repository where to store the tag
tag_name String Name for the tag; this name is validated for consistency. It should also not conflict with an already existing tag name
target Object Object to which this tag points. This object must belong to the given repo.
tagger Signature Signature of the tagger for this tag, and of the tagging time
message String Full message for this tag
force Number Overwrite existing references
Returns
Oid 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_EEXISTS error code.

Tag.createLightweight Async

Tag.createLightweight(repo, tag_name, target, force).then(function(oid) {
  // Use oid
});
Parameters Type
repo Repository Repository where to store the lightweight tag
tag_name String Name for the tag; this name is validated for consistency. It should also not conflict with an already existing tag name
target Object Object to which this tag points. This object must belong to the given repo.
force Number Overwrite existing references
Returns
Oid the OID of the provided
target object. If the tag already exists, this parameter
will be filled with the oid of the existing pointed object
and the function will return a GIT_EEXISTS error code.

Tag.delete Async

Tag.delete(repo, tag_name).then(function(result) {
  // Use result
});
Parameters Type
repo Repository Repository where lives the tag
tag_name String Name of the tag to be deleted; this name is validated for consistency.
Returns
Number 0 on success, GIT_EINVALIDSPEC or an error code

Tag.list Async

Tag.list(repo).then(function(array) {
  // Use array
});
Parameters Type
repo Repository Repository where to find the tags
Returns
Array

Tag.listMatch Sync

var result = Tag.listMatch(tag_names, pattern, repo);
Parameters Type
tag_names Strarray Pointer to a git_strarray structure where the tag names will be stored
pattern String Standard fnmatch pattern
repo Repository Repository where to find the tags
Returns
Number 0 or an error code

Tag.lookup Async

Tag.lookup(repo, id).then(function(tag) {
  // Use tag
});

Retrieves the tag pointed to by the oid

Parameters Type
repo Repository The repo that the tag lives in
id String, Oid, Tag The tag to lookup
Returns
Tag

Tag.lookupPrefix Async

Tag.lookupPrefix(repo, id, len).then(function(tag) {
  // Use tag
});
Parameters Type
repo Repository the repo to use when locating the tag.
id Oid identity of the tag to locate.
len Number the length of the short identifier
Returns
Tag

Tag#dup Async

tag.dup().then(function(tag) {
  // Use tag
});
Returns
Tag

Tag#free Sync

tag.free();

Tag#id Sync

var oid = tag.id();
Returns
Oid object identity for the tag.

Tag#message Sync

var string = tag.message();
Returns
String message of the tag or NULL when unspecified

Tag#name Sync

var string = tag.name();
Returns
String name of the tag

Tag#owner Sync

var repository = tag.owner();
Returns
Repository Repository that contains this tag.

Tag#peel Async

tag.peel().then(function(object) {
  // Use object
});
Returns
Object

Tag#tagger Sync

var signature = tag.tagger();
Returns
Signature reference to the tag's author or NULL when unspecified

Tag#target Sync

var object = tag.target();
Returns
Object the target

Tag#targetId Sync

var oid = tag.targetId();
Returns
Oid

Tag#targetType Sync

var result = tag.targetType();
Returns
Number type of the tagged object