Reputation: 40619
Whenever I run git ls-tree
, the first number in every line is 100644
. What does this number mean, and is it really always that number every time?
The only guess I have is that it's a number for some future compatibility reasons.
--EDIT--
I misread the manual. It turns out that the first number is the mode
. So I guess my question is what does mode
mean? (file permissions?)
Upvotes: 2
Views: 258
Reputation: 12202
Those are Unix filesystem permissions in octal notation. The first three digits denote the file type (100
means directory), and the following three digits represent permissions for the owner, the owning group, and everybody else (respectively).
The following basic permissions can be combined:
--x
): execute-w-
): writer--
): readIn other words 644 means "read and write for the owner, read-only for the rest".
Upvotes: 4