diff options
Diffstat (limited to 'object/tree/mode/mode.go')
| -rw-r--r-- | object/tree/mode/mode.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/object/tree/mode/mode.go b/object/tree/mode/mode.go new file mode 100644 index 00000000..70b6fd38 --- /dev/null +++ b/object/tree/mode/mode.go @@ -0,0 +1,24 @@ +package mode + +// Mode represents the mode of an entry in a Git tree. +type Mode uint32 + +const ( + // Directory is the mode of a subtree entry. + Directory Mode = 0o40000 + + // Regular is the mode of a non-executable regular file. + Regular Mode = 0o100644 + + // Executable is the mode of an executable regular file. + Executable Mode = 0o100755 + + // Symlink is the mode of a symbolic link. + Symlink Mode = 0o120000 + + // Gitlink is the mode of a gitlink (submodule commit) entry. + Gitlink Mode = 0o160000 +) + +// maxModeDigits is the largest number of octal digits in any canonical mode. +const maxModeDigits = 6 |
