'Iterate over entries.
:param name_order: If True, iterate in name order instead of tree
order.
:return: Iterator over (name, mode, sha) tuples'

def iteritems(self, name_order=False):

    return sorted_tree_items(self._entries, name_order)
