Git.framework Reference Library

GITTag Class Reference

GITTag Class Reference

Inherits from
Conforms to
Declared in GITTag.h

Overview

This class represents Tag objects in a git repository.

Tag objects attach a conventional name to another object in the repository, typically a commit. The creation of the tag is dated and attributed to a specific actor within the repository, freqently a description of the meaning of the name is included.

* object 1615307cc4523f183e777df67f168c86908e8007 * type commit * tag v1.0.0 * tagger A. Developer <dev@example.com> 444123000 +0000 * * A tag message meant to describe what this tag defines *

Tasks

Properties

name

Name of the tag.

@property NSString *name
Declared In
GITTag.h

target

Cache of the target once we've found it.

@property GITObject *target
Declared In
GITTag.h

tagger

Actor who created the tag.

@property GITActor *tagger
Declared In
GITTag.h

taggerDate

Date the tag was created.

@property GITDateTime *taggerDate
Declared In
GITTag.h

message

Tag message.

@property NSString *message
Declared In
GITTag.h

Class Methods

tagFromData:sha1:repo:error:

+ (GITTag *)tagFromData:(NSData *)data sha1:(GITObjectHash *)objectHash repo:(GITRepo *)repo error:(NSError **)error
Parameters
data

The data describing the tag

objectHash

The SHA1 hash of the receiver

repo

The repository the tag is a member of

error

NSError describing the error that occurred

Return Value

A tag object from the data

Discussion

Creates and returns a tag from the data.

The data content is parsed to extract the information about the tag such as the name, referenced object, tagger, dates and the tag message.

Declared In
GITTag.h

Instance Methods

refersToObjectHash:

- (BOOL)refersToObjectHash:(GITObjectHash *)objectHash
Parameters
objectHash

Object Hash to compare with the receivers target object hash

Return Value

YES if the object hash matches that of the targets object hash, NO otherwise.

Discussion

Checks if the receivers target object hash matches the objectHash given.

Declared In
GITTag.h

refersToObject:

- (BOOL)refersToObject:(GITObject *)object
Parameters
object

GITObject to compare with the receivers target object.

Return Value

YES if the object matches that of the receivers target object, NO otherwise.

Discussion

Checks if the receivers target matches the object given.

Declared In
GITTag.h

Last updated: 2011-2-20