Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] implementation of --first-parent

Hello,

I have been for quite a while trying to move one of my gradle scripts from native git to jgit for cross platform reasons

While designing this script which essentially is git rev-list master --first-parent --count, I found that the RevWalk reads the commit's parents if I filtered it during the walk (see the SO answer).
I have for now resolved to calling RevCommit.getParent and trying to parse the tree ignoring all parents but first (see my solution)

But I think this is a sub-par solution.

Is there any other constructs in jgit that I can use for this purpose

Back to the top