revision: make tree comparison functions take commits rather than trees