nearly working linked list traversal of github commits