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".

type tag

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.

Specializers:
(reference)
(remote)
(tag)
(git-object)

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.

Specializers:
(reference)
(remote)
(tag)
(git-object)

generic (tagger object)

Returns the signature of the tagger of OBJECT.

The return value is a signature (a property list with keys :NAME, :EMAIL and :TIME. If the tag is not annotated then nil will be returned.

Specializers:
(reference)
(tag)

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.

Specializers:
(reflog-entry)
(commit)
(tag)

Target

method (target (object tag))

Returns the target of a tag.

Specializers:
(reference)
(tag)

method (resolve (object tag) &optional stop-at)

Resolve the tag target until the target object is not a tag anymore. Basically calls TARGET on tag and result until there is a COMMIT returned.

Using values returns the finally found object and a list of the traversed objects.

Specializers:
(reference)
(tag)

Creating

function (make-tag name message &key repository target tagger force)

Create a tag that points to target.

NAME is the name of the tag. MESSAGE will set the message body of the tag.

REPOSITORY is the repository that the tag will be added to. TARGET is the object that the tag will point to. TAGGER should be a signature plist.

If FORCE is t the tag will be created, even if a tag with the same name already exists. If FORCE is nil, it will return an error if that is the case.

Accessing

method (get-object (class tag) (id/name T) (repository T))

method (list-objects (class tag) (repository T) &key test test-not)

Returns a list of tag for the repository. If the tag is an annotated tag then a TAG object 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}>
 ...)
Specializers:
((eql :oid) repository)
(remote common-lisp:t)
(tag common-lisp:t)
((eql :oid) odb)
(reference common-lisp:t)