jgit how can i get all the commits that occurred between two dates

久未见 提交于 2020-01-02 07:02:22

问题


Or just all the commits that occurred between two dates? In SVN, you could do something like svn diff -r{date}:{date} to do it!


回答1:


You can take example of this JGit test class RevWalkFilterTest.java:

Date since = getClock();
Date until = getClock();
RevFilter between = CommitTimeRevFilter.between(since, until);

It uses the class org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter.



来源:https://stackoverflow.com/questions/19580762/jgit-how-can-i-get-all-the-commits-that-occurred-between-two-dates

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!