How do you get the transfer date and date from JGit RevCommit

RevCommit has a getCommitTime() method, but it returns an int, and it has no time for the author. How can I get the author and commit date from RevCommit ?

+7
source share
1 answer

Same:

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

Also see the API documentation .

+15
source

All Articles