Tag¶
Within git there are 2 types of tags, lightweight and annotated.
Lightweight tags are REFERENCES within the
tag namespace. Annotated tags are objects stored in the ODB.
Annotated tags have a TARGET and a TAGGER, which makes them different
from commits. TAG-P can be used to determine if a tag
or reference is a “tag”.
- CLOS class tag
- Superclass:
[‘T’]
- Metaclass:
standard-class
Tags are used to identify interesting points in the repositories history.
Details¶
- Method (full-name (object TAG))¶
Returns the name of
OBJECT, as a string.What exactly the name is depends on the type of the object.
See also:
full-name
- Method (short-name (object TAG))¶
Returns the short name of
OBJECT, as a string.What exactly the name is depends on the type of the object.
See also:
short-name
- Generic (tagger object)¶
-
(
tagger(tag REFERENCE)) -
(
tagger(tag TAG))
Returns the signature of the tagger of
OBJECT.The return value is a signature (a property list with keys
:NAME,:EMAILand:TIME. If the tag is not annotated then nil will be returned.-
(
- Method (message (object TAG))¶
Return the message associated with
OBJECT.For example for commits this will return the commit message and for tags the message associated with the tag.
See also:
message
Target¶
- Method (target (object TAG))
Returns the target of a tag.
See also:
target
Creating¶
- Method (make-object (class (eq TAG)) (id/name T) (repository T) &key url type force target signature message log-message &allow-other-keys)¶
Create a tag to
TARGET. The type of tag depends onTYPE. IfTYPEis:ANNOTATEDthe value ofTARGETshould be anOIDand a direct tag is created. IfTYPEis:LIGHTWEIGHT, a reference is created andTARGETshould be aOID.SIGNATUREshould be a signature plist.If
FORCEis t the tag will be created, even if a tag with the same name already exists. IfFORCEis nil, it will return an error if that is the case.See also:
make-object
Accessing¶
- Method (get-object (class (eq TAG)) (id/name T) (repository T))¶
Return an object of type
CLASSfrom the object database. The lookup will use either an oid or a name to find the object.See also:
get-object
- Method (list-objects (class (eq TAG)) (repository T) &key test test-not)¶
Returns a list of tag for the repository. If the tag is an annotated tag then a
TAGobject will be returned, otherwise it will be a ref with the in the tag namespace.GIT> (list-objects 'tag (open-repository #p"/home/russell/projects/ecl/")) (#<TAG refs/tags/ECL.8.12.0 {1006621153}> #<REFERENCE refs/tags/ECL.9.8.3 {1006B277C3}> #<REFERENCE refs/tags/ECL.9.8.4 {1006B279C3}> #<REFERENCE refs/tags/ECL.9.8.2 {1006B27BC3}> #<REFERENCE refs/tags/ECLS.0.4 {1006B27DC3}> #<REFERENCE refs/tags/ECL.13.5.1 {1006B27FD3}> ...)
See also:
list-objects