Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Finding the children of a commit

Dear List,

I'm trying to find the easiest and mos effective way of finding the children of a commit. As I didn't find a method that does exactly that (no getChildren() os such) I implemented this using a RevWalk object. I simply start from the commit in question and walk the tree using RevSort.TOPO and RevSort.REVERSE until. The method stops when the currently visited revcommit object doesn't have the commit in its parents array. Is there a more effective way (or even a direct method) to implement this behaviour?

Thanks in advance,
Ákos Tajti

Back to the top