packfile: add repository argument to read_object