how do I get all commits of a branch with JGit, without changing the working directory?
Unfortunately the JGit docs are not very good ...
In ruby with grit it is very easy:
repo = Grit::Repo.new(pathToRepo)
repo.commits(branchName, false).each do |commit|
doSomethingWithTheCommit
end
Bye,
hurik
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…