authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-04 03:55:38 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-04 03:55:38 -08:00
log7cf96d9457620b0cdf9648bcbe7920ac77c2441e
tree41e2a58ff6e95cde5e2af0b1ab137d2ab90b7162
parent8812f4e4d8b112e371be6ce570dd780485a80911
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fix for switching to zig-nfs


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

git.zig+2-2
...@@ -68,14 +68,14 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: nfs.Dir) !?CommitId {...@@ -68,14 +68,14 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: nfs.Dir) !?CommitId {
68 @memcpy((&buf).ptr, h[5..]);68 @memcpy((&buf).ptr, h[5..]);
69 buf[h[5..].len] = 0;69 buf[h[5..].len] = 0;
70 const reffile = dir.readFileAlloc(alloc, buf[0..h[5..].len :0], 1024) catch |err| switch (err) {70 const reffile = dir.readFileAlloc(alloc, buf[0..h[5..].len :0], 1024) catch |err| switch (err) {
71 error.FileNotFound => break :blk,71 error.ENOENT => break :blk,
72 else => |e| return e,72 else => |e| return e,
73 };73 };
74 return ensureObjId(CommitId, std.mem.trimRight(u8, reffile, "\n"));74 return ensureObjId(CommitId, std.mem.trimRight(u8, reffile, "\n"));
75 }75 }
76 blk: {76 blk: {
77 const pckedrfs = dir.readFileAlloc(alloc, "packed-refs", 1024 * 1024 * 1024) catch |err| switch (err) {77 const pckedrfs = dir.readFileAlloc(alloc, "packed-refs", 1024 * 1024 * 1024) catch |err| switch (err) {
78 error.FileNotFound => break :blk,78 error.ENOENT => break :blk,
79 else => |e| return e,79 else => |e| return e,
80 };80 };
81 var iter = std.mem.splitScalar(u8, pckedrfs, '\n');81 var iter = std.mem.splitScalar(u8, pckedrfs, '\n');