authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-10 16:45:06 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-10 16:45:06 -07:00
logd8c28f72f5d5bc1f9bf10e0ffa78fdc0595bda2c
tree1c2229cb81c44c157de9f0afd2b8e5c84dccc544
parent3d408725231b4c6b45ccc9ba5a050d4a5ab1a3b7
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add Repository.getObjectS()

a bring back of getObjectSize nesting things that need to be try'd is an anti-pattern so more semantic methods is okay

1 files changed, 4 insertions(+), 0 deletions(-)

git.zig+4
......@@ -993,6 +993,10 @@ pub const Repository = struct {
993993 return (try r.getObjectA(arena, oid)).content;
994994 }
995995
996 pub fn getObjectS(r: *Repository, arena: std.mem.Allocator, oid: Id) !usize {
997 return (try r.getObjectC(arena, oid)).len;
998 }
999
9961000 const GitObject = struct {
9971001 type: RefType,
9981002 content: []const u8,