`if ($lastCommit)` is enough