Git.framework Reference Library

GITRevList Class Reference

GITRevList Class Reference

Declared in GITRevList.h

Overview

The GITRevList class lists commit objects in reverse chronological order. A subset of the commit history can be excluded or negated from the list by calling -subtractDescendentsFromCommit: which will remove all commits reachable from the specified commit from the list.

Sorted lists of commits are provided through one of the -arrayOfCommitsSortedBy* methods.

Tasks

Class Methods

revListWithCommit:

+ (GITRevList *)revListWithCommit:(GITCommit *)head
Parameters
head

Commit object to list from

Return Value

New rev list object with the history of the head commit.

Discussion

Creates and returns a rev list object with the history from the head commit.

Declared In
GITRevList.h

Instance Methods

initWithCommit:

- (id)initWithCommit:(GITCommit *)head
Parameters
head

Commit object to list from

Return Value

Rev list object with the history of the head commit.

Discussion

Initializes and returns a rev list object with history from the head commit.

Declared In
GITRevList.h

subtractDescendentsFromCommit:

- (void)subtractDescendentsFromCommit:(GITCommit *)tail
Discussion

Removes commits from the receiver which are in the history of the given tail commit.

Declared In
GITRevList.h

arrayOfCommitsSortedByDate

- (NSArray *)arrayOfCommitsSortedByDate
Return Value

array of commits sorted by date

Discussion

Returns an array of commit objects sorted by their commit date.

The result of this method is equivalent to git rev-list.

Declared In
GITRevList.h

arrayOfCommitsSortedByTopology

- (NSArray *)arrayOfCommitsSortedByTopology
Return Value

array of commits sorted by topology

Discussion

Returns an array of commit objects sorted by topology.

The result of this method is equivalent to git rev-list --topo-order.

Declared In
GITRevList.h

arrayOfCommitsSortedByTopologyAndDate

- (NSArray *)arrayOfCommitsSortedByTopologyAndDate
Return Value

array of commits sorted by topology and date

Discussion

Returns an array of commit objects sorted by topology and commit date.

The result of this method is equivalent to git rev-list --date-order.

Declared In
GITRevList.h

arrayOfReachableObjects

- (NSArray *)arrayOfReachableObjects
Return Value

Array of objects reachable from the head of the receiver.

Discussion

Returns an array of the objects which are reachable from the head of the receiver.

This is primarily used when collecting the list of objects to include in a PACK file prior to generation.

Declared In
GITRevList.h

arrayOfReachableObjectsAndTags

- (NSArray *)arrayOfReachableObjectsAndTags
Return Value

Array of objects and tags reachable from the head of the receiver.

Discussion

Returns an array of the objects and tags which are reachable from the head of the receiver.

Declared In
GITRevList.h

arrayOfReachableObjectsAndTags:

- (NSArray *)arrayOfReachableObjectsAndTags:(NSArray *)tags
Parameters
tags

Array of tags to be considered for inclusion in the resulting array. This should be an inclusive list of all tags which might be reachable from the head of the receiver.

Return Value

Array of objects and tags reachable from the head of the receiver.

Discussion

Returns an array of the objects and tags which are reachable from the head of the receiver.

Declared In
GITRevList.h

Last updated: 2011-2-20