line-log: use commit_list_append() instead of duplicating its code