'Add an entry to the tree.
:param mode: The mode of the entry as an integral type. Not all
possible modes are supported by git; see check() for details.
:param name: The name of the entry, as a string.
:param hexsha: The hex SHA of the entry as a string.'

def add(self, name, mode, hexsha):

    if (isinstance(name, int) and isinstance(mode, bytes)):
        (name, mode) = (mode, name)
        warnings.warn('Please    use    Tree.add(name,    mode,    hexsha)', category=DeprecationWarning, stacklevel=2)
    self._entries[name] = (mode, hexsha)
    self._needs_serialization = True
