mzxueyun
mzxueyun

Reputation: 33

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

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!

Upvotes: 3

Views: 1061

Answers (1)

VonC
VonC

Reputation: 1323203

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.

Upvotes: 5

Related Questions