Git.framework Reference Library

GITBranch Class Reference

GITBranch Class Reference

Declared in GITBranch.h

Overview

This class represents GITBranch objects.

Branches are threads of commits in a repository, they refer to the HEAD of a thread.

Tasks

Properties

repo

Repository the branch is part of.

@property GITRepo *repo
Declared In
GITBranch.h

ref

Ref the branch points to.

@property GITRef *ref
Declared In
GITBranch.h

remote

Flag indicating if the branch is a remote branch.

@property BOOL remote
Declared In
GITBranch.h

Class Methods

branchWithName:inRepo:

+ (GITBranch *)branchWithName:(NSString *)theName inRepo:(GITRepo *)theRepo
Parameters
theName

Name of the branch

theRepo

Repository to resolve the branch in

Return Value

branch initialised with the name specified, or nil if the branch can't be resolved

Discussion

Creates and returns a branch by the name specified.

The name of the branch is used to resolve the reference for the branch, the resolved reference is used to create the GITBranch.

See Also
Declared In
GITBranch.h

branchFromRef:

+ (GITBranch *)branchFromRef:(GITRef *)theRef
Parameters
theRef

GITRef describing the branch

Return Value

branch initialised with the reference

Discussion

Creates and returns an autoreleased branch using the reference specified.

See Also
Declared In
GITBranch.h

Instance Methods

initFromRef:

- (id)initFromRef:(GITRef *)theRef
Parameters
theRef

GITRef describing the branch

Return Value

branch initialised with the reference

Discussion

Creates and returns a branch for the specified reference.

Declared In
GITBranch.h

name

- (NSString *)name
Return Value

name of the branch

Discussion

Returns the name of the branch.

Declared In
GITBranch.h

Last updated: 2011-2-20