Skip to content

Latest commit

 

History

History
370 lines (289 loc) · 9.77 KB

File metadata and controls

370 lines (289 loc) · 9.77 KB
layout menu_item title description return_to sections
default
api
Tag
Version 0.26.1
API Documentation Index
/api/
annotationCreate create createBuffer createFromBuffer createLightweight createWithSignature delete list listMatch lookup lookupPrefix #dup #extractSignature #id #message #name #owner #peel #tagger #target #targetId #targetType
#annotationCreate
#create
#createBuffer
#createFromBuffer
#createLightweight
#createWithSignature
#delete
#list
#listMatch
#lookup
#lookupPrefix
#dup
#extractSignature
#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.createBuffer Async

Tag.createBuffer(repo, tagName, target, tagger).then(function(string) {
  // Use string
});
Parameters Type
repo Repository
tagName String
target Oid
tagger Signature
Returns
String

Tag.createFromBuffer Async

Tag.createFromBuffer(repo, buffer, force).then(function(oid) {
  // Use oid
});
Parameters Type
repo Repository Repository where to store the tag
buffer String Raw tag data
force Number Overwrite existing tags
Returns
Oid the OID of the newly created tag

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.createWithSignature Async

Tag.createWithSignature(repo, tagName, target, tagger, message, force, signingCallback).then(function(oid) {
  // Use oid
});
Parameters Type
repo Repository
tagName String
target Oid
tagger Signature
message String
force Number
signingCallback Function Takes a string and returns a string representing the signed message
Returns
Oid

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 Async

Tag.listMatch(pattern, repo).then(function(array) {
  // Use array
});
Parameters Type
pattern String Standard fnmatch pattern
repo Repository Repository where to find the tags
Returns
Array

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#extractSignature Async

tag.extractSignature(signatureType).then(function(string) {
  // Use string
});

Retrieves the signature of an annotated tag

| Parameters | Type | | --- | --- | --- | | signatureType | String | |

Returns
String

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 Async

tag.target().then(function(object) {
  // Use object
});
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