Git.framework Reference Library

GITRef Class Reference

GITRef Class Reference

Declared in GITRef.h

Overview

GITRef objects provide access to git references.

Tasks

Properties

name

@property NSString *name
Discussion

Name of the reference.

Declared In
GITRef.h

targetName

@property NSString *targetName
Discussion

Value of the reference.

If the receiver is a link then targetName contains the name of the reference it points to. If the receiver is not a link then targetName contains the SHA1 hash of the GITObject the reference points to.

Declared In
GITRef.h

Class Methods

refWithName:andTarget:inRepo:

+ (id)refWithName:(NSString *)theName andTarget:(NSString *)theTarget inRepo:(GITRepo *)theRepo
Parameters
theName

Name of the reference

theTarget

Link target or SHA1 hash of object

theRepo

Repository the reference exists in

Return Value

reference with the specified name, target and repository

Discussion

Creates an autoreleased reference with the specified name, target and repository.

See Also
Declared In
GITRef.h

Instance Methods

initWithName:andTarget:inRepo:

- (id)initWithName:(NSString *)theName andTarget:(NSString *)theTarget inRepo:(GITRepo *)theRepo
Parameters
theName

Name of the reference

theTarget

Link target or SHA1 hash of object

theRepo

Repository the reference exists in

Return Value

reference with the specified name, target and repository

Discussion

Initialises a reference with the specified name, target and repository

Declared In
GITRef.h

resolve

- (GITRef *)resolve
Return Value

reference linked to by the receiver, returns the receiver if not a link

Discussion

Returns the reference linked to by the receiver, returns the receiver if not a link.

The links will be resolved until the first non-link ref is found.

Declared In
GITRef.h

target

- (GITObject *)target
Return Value

Object the resolved receiver references

Discussion

Returns the object referenced by resolving the receiver.

See Also
Declared In
GITRef.h

Last updated: 2011-2-20