changed all the tree references to ObjectID because I need Ids and not trees. The main thing I do with the trees is feeding them into the treewalk - and therefore (strangly?) I cannot put a tree itself but an Id.

One  problem remains: that is one remaining call to Tree.findBlobMember() in hasParentBlob() (now called mergeTreeHasParentBlob()). I asked in http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00458.html about the meaning of this call and would be happy to remove this call. Because of this problem I still have a reference to a Tree, but not in the API of this class.