class documentation
Represents an entry in the Git index.
This is a higher-level representation of an index entry that includes parsed data and convenience methods.
| Class Method | from |
Create an IndexEntry from a SerializedIndexEntry. |
| Method | is |
Check if this entry represents a sparse directory. |
| Method | serialize |
Serialize this entry with a given name and stage. |
| Method | set |
Helper method to set or clear the skip-worktree bit in extended_flags. |
| Method | stage |
Get the merge conflict stage of this entry. |
| Class Variable | ctime |
Undocumented |
| Class Variable | dev |
Undocumented |
| Class Variable | extended |
Undocumented |
| Class Variable | flags |
Undocumented |
| Class Variable | gid |
Undocumented |
| Class Variable | ino |
Undocumented |
| Class Variable | mode |
Undocumented |
| Class Variable | mtime |
Undocumented |
| Class Variable | sha |
Undocumented |
| Class Variable | size |
Undocumented |
| Class Variable | uid |
Undocumented |
| Property | skip |
Return True if the skip-worktree bit is set in extended_flags. |
Create an IndexEntry from a SerializedIndexEntry.
| Parameters | |
serialized:SerializedIndexEntry | SerializedIndexEntry to convert |
| Returns | |
IndexEntry | New IndexEntry instance |
Check if this entry represents a sparse directory.
A sparse directory entry is a collapsed representation of an entire directory tree in a sparse index. It has: - Directory mode (0o040000) - SKIP_WORKTREE flag set - Path ending with '/' - SHA pointing to a tree object
| Parameters | |
name:bytes | The path name for this entry (IndexEntry doesn't store name) |
| Returns | |
bool | True if entry is a sparse directory entry |
Serialize this entry with a given name and stage.
| Parameters | |
name:bytes | Path name for the entry |
stage:Stage | Merge conflict stage |
| Returns | |
SerializedIndexEntry | SerializedIndexEntry ready for writing to disk |