[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jgit-dev] Finding the children of a commit
- From: Akos Tajti <akos.tajti@xxxxxxxxx>
- Date: Thu, 5 May 2011 20:33:38 +0200
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date; b=v11CdDhyyqK7JhgFQl1wgxbtU2iiT6vfuZpxMj60rZN1jRflPWX/TQPk67tRzguQs2 AdmudOucl9RVtirfZWVGnSiU1dClAD9t/hNd5cWXdqoeu9rDA6mLBy5XM/5jU9M1+GaA hYK9pNvyi3Dx5gXX3PvZb6A0v1nPoR75Lw88k=
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,