org.netbeans.libs.git
Class GitRevisionInfo
java.lang.Object
org.netbeans.libs.git.GitRevisionInfo
public final class GitRevisionInfo
- extends Object
Provides information about a certain commit, usually is returned by
git commit or log command.
|
Nested Class Summary |
static class |
GitRevisionInfo.GitFileInfo
Provides information about what happened to a file between two different commits. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getRevision
public String getRevision()
- Returns:
- id of the commit
getShortMessage
public String getShortMessage()
- Returns:
- the first line of the commit message.
getFullMessage
public String getFullMessage()
- Returns:
- full commit message
getCommitTime
public long getCommitTime()
- Returns:
- time this commit was created in milliseconds.
getAuthor
public GitUser getAuthor()
- Returns:
- author of the commit
getCommitter
public GitUser getCommitter()
- Returns:
- person who actually committed the changes, may or may not be the same as a return value of the
getAuthor method.
getModifiedFiles
public Map<File,GitRevisionInfo.GitFileInfo> getModifiedFiles()
throws GitException
- Returns the information about the files affected (modified, deleted or added) by this commit.
First time call should not be done from the EDT. When called for the first time the method execution can take a big amount of time
because it compares the commit tree with its parents and identifies the modified files.
Any subsequent call to the first successful call will return the cached value and will be fast.
- Returns:
- files affected by this change set
- Throws:
GitException - when an error occurs
getParents
public String[] getParents()
- Returns:
- commit ids of this commit's parents