maybe just one line

    repo.log(ref, path, max_count: limit, skip: offset, follow: path.present?)