Many git directories have permissions "040000" instead of "40000".
It's also possible there are other types of weird permissions non-octal or longer than 6 octal digits permissions (though I have not seen any yet)
We should be able to store them.
Many git directories have permissions "040000" instead of "40000".
It's also possible there are other types of weird permissions non-octal or longer than 6 octal digits permissions (though I have not seen any yet)
We should be able to store them.
Possible solution: store them as an ascii string instead of an integer.
(An alternative would be a zero_padded boolean, but that's ugly and does not cover the other weird cases)
Complete proposal for the above solution:
perms_oct = attr.ib(type=str, validators=type_validator()) """Same as 'perms', but unparsed. This is (or should be) a POSIX-like permission mode, formatted in octal with no leading zero."""