commit: add repository argument to lookup_commit