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.


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.

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.

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.

  • (tag)
  • (reference)
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.

  • (tag)
  • (reflog-entry)
  • (commit)


method (target (object tag))#

Returns the target of a 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.



method (make-object (class 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 on TYPE. If TYPE is :ANNOTATED the value of TARGET should be an OID and a direct tag is created. If TYPE is :LIGHTWEIGHT, a reference is created and TARGET should be a OID. SIGNATURE 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.



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

Return an object of type CLASS from the object database. The lookup will use either an oid or a name to find the object.

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}>