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 ( 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 ( repo , tagName , target , tagger ) . then ( function ( string ) {
// Use 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
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 ( repo ) . then ( function ( array ) {
// Use array
} ) ;
Parameters
Type
repo
Repository
Repository where to find the tags
Tag . listMatch ( pattern , repo ) . then ( function ( array ) {
// Use array
} ) ;
Parameters
Type
pattern
String
Standard fnmatch pattern
repo
Repository
Repository where to find the tags
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
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
tag . dup ( ) . then ( function ( tag ) {
// Use tag
} ) ;
Tag# extractSignature Async
tag . extractSignature ( signatureType ) . then ( function ( string ) {
// Use string
} ) ;
Retrieves the signature of an annotated tag
| Parameters | Type |
| --- | --- | --- |
| signatureType | String | |
Returns
Oid
object identity for the tag.
var string = tag . message ( ) ;
Returns
String
message of the tag or NULL when unspecified
Returns
String
name of the tag
var repository = tag . owner ( ) ;
Returns
Repository
Repository that contains this tag.
tag . peel ( ) . then ( function ( object ) {
// Use object
} ) ;
var signature = tag . tagger ( ) ;
Returns
Signature
reference to the tag's author or NULL when unspecified
tag . target ( ) . then ( function ( object ) {
// Use object
} ) ;
var oid = tag . targetId ( ) ;
var result = tag . targetType ( ) ;
Returns
Number
type of the tagged object