如何从JGit RevCommit中获取作者日期和提交日期
RevCommit有一个如何从JGit RevCommit中获取作者日期和提交日期,git,jgit,Git,Jgit,RevCommit有一个getCommitTime()方法,但它返回和int,并且没有编写时间。如何从RevCommit中获取作者和提交日期 RevCommit commit = ...; PersonIdent authorIdent = commit.getAuthorIdent(); Date authorDate = authorIdent.getWhen(); TimeZone authorTimeZone = authorIdent.getTimeZone(); PersonId
getCommitTime()
方法,但它返回和int,并且没有编写时间。如何从RevCommit中获取作者和提交日期
RevCommit commit = ...;
PersonIdent authorIdent = commit.getAuthorIdent();
Date authorDate = authorIdent.getWhen();
TimeZone authorTimeZone = authorIdent.getTimeZone();
PersonIdent committerIdent = commit.getCommitterIdent();
...
另请看。哇,这比我想象的要简单。根据我的经验,有时这不是最直观的。再次感谢!