Avoid loading commits twice in log with diffs