diff --git a/git.zig b/git.zig index 393a132c8e1d55db706575d985b761e9a0c9113d..cafb0c63caf7e863818c01cb65c36631001326fd 100644 --- a/git.zig +++ b/git.zig @@ -68,14 +68,14 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: nfs.Dir) !?CommitId { @memcpy((&buf).ptr, h[5..]); buf[h[5..].len] = 0; const reffile = dir.readFileAlloc(alloc, buf[0..h[5..].len :0], 1024) catch |err| switch (err) { - error.FileNotFound => break :blk, + error.ENOENT => break :blk, else => |e| return e, }; return ensureObjId(CommitId, std.mem.trimRight(u8, reffile, "\n")); } blk: { const pckedrfs = dir.readFileAlloc(alloc, "packed-refs", 1024 * 1024 * 1024) catch |err| switch (err) { - error.FileNotFound => break :blk, + error.ENOENT => break :blk, else => |e| return e, }; var iter = std.mem.splitScalar(u8, pckedrfs, '\n');