Class Commit
- All Implemented Interfaces:
Serializable
,Cloneable
Returns information about a specific commit.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Any additional data associated with the specified commit.Information about the author of the specified commit.Information about the person who committed the specified commit, also known as the committer.The message associated with the specified commit.The parent list for the specified commit.Tree information for the specified commit.int
hashCode()
void
setAdditionalData
(String additionalData) Any additional data associated with the specified commit.void
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
(String message) The message associated with the specified commit.void
setParents
(Collection<String> parents) The parent list for the specified commit.void
Tree information for the specified commit.toString()
Returns a string representation of this object; useful for testing and debugging.withAdditionalData
(String additionalData) Any additional data associated with the specified commit.withAuthor
(UserInfo author) Information about the author of the specified commit.withCommitter
(UserInfo committer) Information about the person who committed the specified commit, also known as the committer.withMessage
(String message) The message associated with the specified commit.withParents
(String... parents) The parent list for the specified commit.withParents
(Collection<String> parents) The parent list for the specified commit.withTreeId
(String treeId) Tree information for the specified commit.
-
Constructor Details
-
Commit
public Commit()
-
-
Method Details
-
setTreeId
Tree information for the specified commit.
- Parameters:
treeId
- Tree information for the specified commit.
-
getTreeId
Tree information for the specified commit.
- Returns:
- Tree information for the specified commit.
-
withTreeId
Tree information for the specified commit.
- Parameters:
treeId
- Tree information for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getParents
The parent list for the specified commit.
- Returns:
- The parent list for the specified commit.
-
setParents
The parent list for the specified commit.
- Parameters:
parents
- The parent list for the specified commit.
-
withParents
The parent list for the specified commit.
NOTE: This method appends the values to the existing list (if any). Use
setParents(java.util.Collection)
orwithParents(java.util.Collection)
if you want to override the existing values.- Parameters:
parents
- The parent list for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withParents
The parent list for the specified commit.
- Parameters:
parents
- The parent list for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMessage
The message associated with the specified commit.
- Parameters:
message
- The message associated with the specified commit.
-
getMessage
The message associated with the specified commit.
- Returns:
- The message associated with the specified commit.
-
withMessage
The message associated with the specified commit.
- Parameters:
message
- The message associated with the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthor
Information about the author of the specified commit.
- Parameters:
author
- Information about the author of the specified commit.
-
getAuthor
Information about the author of the specified commit.
- Returns:
- Information about the author of the specified commit.
-
withAuthor
Information about the author of the specified commit.
- Parameters:
author
- Information about the author of the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCommitter
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withCommitter
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAdditionalData
Any additional data associated with the specified commit.
- Parameters:
additionalData
- Any additional data associated with the specified commit.
-
getAdditionalData
Any additional data associated with the specified commit.
- Returns:
- Any additional data associated with the specified commit.
-
withAdditionalData
Any additional data associated with the specified commit.
- Parameters:
additionalData
- Any additional data associated with the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-