RevCommit 有一个getCommitTime()
方法,但它返回int并且没有作者时间。如何从 RevCommit ?
答案 0 :(得分:19)
像这样:
RevCommit commit = ...;
PersonIdent authorIdent = commit.getAuthorIdent();
Date authorDate = authorIdent.getWhen();
TimeZone authorTimeZone = authorIdent.getTimeZone();
PersonIdent committerIdent = commit.getCommitterIdent();
...