Moved diff method to Repo, implemented without native call.