| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.MessageFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.eclipse.jgit.lib.ObjectId; |
| | | import org.eclipse.jgit.lib.PersonIdent; |
| | | import org.eclipse.jgit.revwalk.RevCommit; |
| | | |
| | |
| | | return refs; |
| | | } |
| | | |
| | | public ObjectId getId() { |
| | | return commit.getId(); |
| | | } |
| | | |
| | | public String getName() { |
| | | return commit.getName(); |
| | | } |
| | |
| | | public String getShortMessage() { |
| | | return commit.getShortMessage(); |
| | | } |
| | | |
| | | public Date getCommitDate() { |
| | | return new Date(commit.getCommitTime() * 1000L); |
| | | } |
| | | |
| | | public int getParentCount() { |
| | | return commit.getParentCount(); |
| | | } |
| | | |
| | | public RevCommit [] getParents() { |
| | | return commit.getParents(); |
| | | } |
| | | |
| | | public PersonIdent getAuthorIdent() { |
| | |
| | | public PersonIdent getCommitterIdent() { |
| | | return commit.getCommitterIdent(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean equals(Object o) { |
| | | if (o instanceof RepositoryCommit) { |
| | |
| | | return 0; |
| | | } |
| | | |
| | | public RepositoryCommit clone(String withRef) { |
| | | return new RepositoryCommit(repository, withRef, commit); |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return MessageFormat.format("{0} {1} {2,date,yyyy-MM-dd HH:mm} {3} {4}", |