write-yourself-a-git
write-yourself-a-git copied to clipboard
[Question] file mode in tree object
In the section 6.2 in the blog article it says [mode] is up to six bytes, and the code includes an assertion that checks the length of mode is 5 or 6 characters.
I'm finding for references which indicate the mode can be 5-chars, but it seems everyone assumes it is 6-chars. Could you please provide any detailed references for the mode string format?
Directory modes are stored as five bytes even though ´ls-tree´ pads them to 6. I'll add a note to clarify this, thanks!
I've just checked it with git ls-tree. Thanks for your reply (as well as your outstanding educational contribution in this project) !