From d8c28f72f5d5bc1f9bf10e0ffa78fdc0595bda2c Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 10 May 2026 16:45:06 -0700 Subject: [PATCH] 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 --- git.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git.zig b/git.zig index 5d0f186a32607830a6cd7a59430a57c2dcce8432..bf022f8c5036c71da445d487bce49ad5a7546a22 100644 --- a/git.zig +++ b/git.zig @@ -993,6 +993,10 @@ pub const Repository = struct { return (try r.getObjectA(arena, oid)).content; } + pub fn getObjectS(r: *Repository, arena: std.mem.Allocator, oid: Id) !usize { + return (try r.getObjectC(arena, oid)).len; + } + const GitObject = struct { type: RefType, content: []const u8, -- 2.54.0