Inherits from | |
---|---|
Conforms to | |
Declared in | GITCommit.h |
This class represents Commit objects in a git repository.
Commit objects are markers of the state of a repository at a specific moment in time, they reference trees which define the file system structure of a repository at a given point.
Commit objects look like the following, the parent may be repeated. tree 80655da8d80aaaf92ce5357e7828dc09adb00993
parent d8fd39d0bbdd2dcf322d8b11390a4c5825b11495
author A. Developer <dev@example.com> 444123000 +0000
committer A. Developer <dev@example.com> 444123000 +0000
A commit message meant to describe what this commit is all about
parentShas
propertyArray of GITObjectHash objects of the parents.
parents
propertyArray of GITCommit parents.
tree
propertyThe tree object the commit references.
author
propertyAuthor of the commit.
committer
propertyCommitter of the commit, different from author if the commit was created by patching.
authorDate
propertyDate the commit was created.
committerDate
propertyDate the commit was committed to the repository via patching.
message
propertyCommit message.
- parentSha1
Array of GITObjectHash
objects of the parents.
@property NSArray *parentShas
GITCommit
.h
Array of GITCommit
parents.
@property NSArray *parents
GITCommit
.h
The tree object the commit references.
@property GITTree *tree
GITCommit
.h
Author of the commit.
@property GITActor *author
GITCommit
.h
Committer of the commit, different from author if the commit was created by patching.
@property GITActor *committer
GITCommit
.h
Date the commit was created.
@property GITDateTime *authorDate
GITCommit
.h
Date the commit was committed to the repository via patching.
@property GITDateTime *committerDate
GITCommit
.h
Commit message.
@property NSString *message
GITCommit
.h
+ (GITCommit *)commitFromData:(NSData *)data sha1:(GITObjectHash *)objectHash repo:(GITRepo *)repo error:(NSError **)error
The data describing the commit
The SHA1 hash of the receiver
The repository the commit is a member of
NSError
describing the error that occurred
A commit object from the data
Creates and returns a commit from the data.
The data content is parsed to extract the information about the commit such as the referenced tree, parents, author, committer, dates and the commit message.
GITCommit
.h
- (NSString *)parentSha1
SHA1 of the parent commit
Returns the last SHA1 in the list of parent commits.
GITCommit
.h
- (BOOL)isMerge
YES if the receiver is a merge point, NO if only one parent
Returns YES if the receiver is a merge point, NO if it has only one parent.
GITCommit
.h
- (BOOL)isInitial
YES if the receiver is the first commit, NO otherwise.
Returns YES if the receiver if the first commit, NO otherwise.
GITCommit
.h
Last updated: 2011-2-20