authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-15 15:49:50 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-15 15:49:50 -07:00
log1996137bb2545e171717a11f523ca0bde10b758c
tree586af448da043cfa8268811bd9695c7da3156b1c
parent50b559f93874f7e6fd9c716a4cc73f2955becbe4
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add Mode.eql()


1 files changed, 9 insertions(+), 1 deletions(-)

git.zig+9-1
......@@ -320,9 +320,17 @@ pub const Tree = struct {
320320 try self.perm_group.nprint(writer);
321321 try self.perm_other.nprint(writer);
322322 }
323
324 pub fn eql(self: Mode, other: Mode) bool {
325 if (self.type != other.type) return false;
326 if (self.perm_user != other.perm_user) return false;
327 if (self.perm_group != other.perm_group) return false;
328 if (self.perm_other != other.perm_other) return false;
329 return true;
330 }
323331 };
324332
325 pub const Type = enum(u16) {
333 pub const Type = enum(u8) {
326334 file = 100,
327335 directory = 40,
328336 submodule = 160,