2012-09-26 70 views

回答

13

像这样:

RevCommit commit = ...; 

PersonIdent authorIdent = commit.getAuthorIdent(); 
Date authorDate = authorIdent.getWhen(); 
TimeZone authorTimeZone = authorIdent.getTimeZone(); 

PersonIdent committerIdent = commit.getCommitterIdent(); 
... 

另见API documentation

+2

哇,比我想象的要简单。根据我的经验,JGit有时候并不是最直观的。再次感谢! – Coder