tests: Switch to use list as stack
tests: Switch to use list as stack

Tidy up change to replace inserts to a list with appends to build the
graph of commits to be constructed.

Change-Id: If75655dc32a9d51f3a437142d36949ee8c4eb6cf

stackforge/git-upstream,stackforge/git-upstream