checkpatch: reduce number of `git log` calls with --git