simplify get_commit_list() slightly by using itertools.islice()