only check for empty repo when necessary in log()