commit: add repository argument to lookup_commit_graft