Skip to main content

Module tree

Module tree 

Source
Expand description

In Git, a tree object is used to represent the state of a directory at a specific point in time. It stores information about the files and directories within that directory, including their names, permissions, and the IDs of the objects that represent their contents.

A tree object can contain other tree objects as well as blob objects, which represent the contents of individual files. The object IDs of these child objects are stored within the tree object itself.

When you make a commit in Git, you create a new tree object that represents the state of the repository at that point in time. The parent of the new commit is typically the tree object representing the previous state of the repository.

Git uses the tree object to efficiently store and manage the contents of a repository. By representing the contents of a directory as a tree object, Git can quickly determine which files have been added, modified, or deleted between two points in time. This allows Git to perform operations like merging and rebasing more quickly and accurately.

Structs§

ArchivedTree
An archived Tree
ArchivedTreeItem
An archived TreeItem
Tree
A tree object is a Git object that represents a directory. It contains a list of entries, one for each file or directory in the tree.
TreeItem
A tree object contains a list of entries, one for each file or directory in the tree. Each entry in the file represents an entry in the tree, and each entry has the following format:
TreeItemResolver
The resolver for an archived TreeItem
TreeResolver
The resolver for an archived Tree

Enums§

ArchivedTreeItemMode
An archived TreeItemMode
TreeItemMode
In Git, the mode field in a tree object’s entry specifies the type of the object represented by that entry. The mode is a three-digit octal number that encodes both the permissions and the type of the object. The first digit specifies the object type, and the remaining two digits specify the file mode or permissions.
TreeItemModeResolver
The resolver for an archived TreeItemMode