public class Commit
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Returns information about a specific commit.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
additionalData
Any additional data associated with the specified commit.
|
private UserInfo |
author
Information about the author of the specified commit.
|
private UserInfo |
committer
Information about the person who committed the specified commit, also
known as the committer.
|
private java.lang.String |
message
The message associated with the specified commit.
|
private java.util.List<java.lang.String> |
parents
The parent list for the specified commit.
|
private java.lang.String |
treeId
Tree information for the specified commit.
|
Constructor and Description |
---|
Commit() |
Modifier and Type | Method and Description |
---|---|
Commit |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAdditionalData()
Any additional data associated with the specified commit.
|
UserInfo |
getAuthor()
Information about the author of the specified commit.
|
UserInfo |
getCommitter()
Information about the person who committed the specified commit, also
known as the committer.
|
java.lang.String |
getMessage()
The message associated with the specified commit.
|
java.util.List<java.lang.String> |
getParents()
The parent list for the specified commit.
|
java.lang.String |
getTreeId()
Tree information for the specified commit.
|
int |
hashCode() |
void |
setAdditionalData(java.lang.String additionalData)
Any additional data associated with the specified commit.
|
void |
setAuthor(UserInfo author)
Information about the author of the specified commit.
|
void |
setCommitter(UserInfo committer)
Information about the person who committed the specified commit, also
known as the committer.
|
void |
setMessage(java.lang.String message)
The message associated with the specified commit.
|
void |
setParents(java.util.Collection<java.lang.String> parents)
The parent list for the specified commit.
|
void |
setTreeId(java.lang.String treeId)
Tree information for the specified commit.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Commit |
withAdditionalData(java.lang.String additionalData)
Any additional data associated with the specified commit.
|
Commit |
withAuthor(UserInfo author)
Information about the author of the specified commit.
|
Commit |
withCommitter(UserInfo committer)
Information about the person who committed the specified commit, also
known as the committer.
|
Commit |
withMessage(java.lang.String message)
The message associated with the specified commit.
|
Commit |
withParents(java.util.Collection<java.lang.String> parents)
The parent list for the specified commit.
|
Commit |
withParents(java.lang.String... parents)
The parent list for the specified commit.
|
Commit |
withTreeId(java.lang.String treeId)
Tree information for the specified commit.
|
private java.lang.String treeId
Tree information for the specified commit.
private java.util.List<java.lang.String> parents
The parent list for the specified commit.
private java.lang.String message
The message associated with the specified commit.
private UserInfo author
Information about the author of the specified commit.
private UserInfo committer
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
private java.lang.String additionalData
Any additional data associated with the specified commit.
public void setTreeId(java.lang.String treeId)
Tree information for the specified commit.
treeId
- Tree information for the specified commit.public java.lang.String getTreeId()
Tree information for the specified commit.
public Commit withTreeId(java.lang.String treeId)
Tree information for the specified commit.
treeId
- Tree information for the specified commit.public java.util.List<java.lang.String> getParents()
The parent list for the specified commit.
public void setParents(java.util.Collection<java.lang.String> parents)
The parent list for the specified commit.
parents
- The parent list for the specified commit.public Commit withParents(java.lang.String... parents)
The parent list for the specified commit.
NOTE: This method appends the values to the existing list (if
any). Use setParents(java.util.Collection)
or
withParents(java.util.Collection)
if you want to override the
existing values.
parents
- The parent list for the specified commit.public Commit withParents(java.util.Collection<java.lang.String> parents)
The parent list for the specified commit.
parents
- The parent list for the specified commit.public void setMessage(java.lang.String message)
The message associated with the specified commit.
message
- The message associated with the specified commit.public java.lang.String getMessage()
The message associated with the specified commit.
public Commit withMessage(java.lang.String message)
The message associated with the specified commit.
message
- The message associated with the specified commit.public void setAuthor(UserInfo author)
Information about the author of the specified commit.
author
- Information about the author of the specified commit.public UserInfo getAuthor()
Information about the author of the specified commit.
public Commit withAuthor(UserInfo author)
Information about the author of the specified commit.
author
- Information about the author of the specified commit.public void setCommitter(UserInfo committer)
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
committer
- Information about the person who committed the specified commit,
also known as the committer. For more information about the
difference between an author and a committer in Git, see Viewing the Commit
History in Pro Git by Scott Chacon and Ben Straub.public UserInfo getCommitter()
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
public Commit withCommitter(UserInfo committer)
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
committer
- Information about the person who committed the specified commit,
also known as the committer. For more information about the
difference between an author and a committer in Git, see Viewing the Commit
History in Pro Git by Scott Chacon and Ben Straub.public void setAdditionalData(java.lang.String additionalData)
Any additional data associated with the specified commit.
additionalData
- Any additional data associated with the specified commit.public java.lang.String getAdditionalData()
Any additional data associated with the specified commit.
public Commit withAdditionalData(java.lang.String additionalData)
Any additional data associated with the specified commit.
additionalData
- Any additional data associated with the specified commit.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Commit clone()
clone
in class java.lang.Object