get_sha1_oneline: make callers prepare the commit list to traverse