| ... | ... | @@ -15,7 +15,7 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !Id { |
| 15 | 15 | |
| 16 | 16 | if (std.mem.startsWith(u8, h, "ref:")) { |
| 17 | 17 | const r = blk: { |
| 18 | | const pckedrfs = dir.readFileAlloc(alloc, "packed-refs", 1024 * 1024) catch |err| switch (err) { |
| 18 | const pckedrfs = dir.readFileAlloc(alloc, "packed-refs", 1024 * 1024 * 1024) catch |err| switch (err) { |
| 19 | 19 | error.FileNotFound => try std.fs.cwd().readFileAlloc(alloc, "/dev/null", 1024), |
| 20 | 20 | else => |e| return e, |
| 21 | 21 | }; |
| ... | ... | @@ -49,6 +49,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| 49 | 49 | .allocator = alloc, |
| 50 | 50 | .cwd_dir = dir, |
| 51 | 51 | .argv = &.{ "git", "cat-file", "-p", obj }, |
| 52 | .max_output_bytes = 1024 * 1024 * 1024, |
| 52 | 53 | }); |
| 53 | 54 | return std.mem.trimRight(u8, result.stdout, "\n"); |
| 54 | 55 | } |