From e22ece2d2e2ed914df502f77f4ab483078b2097d Mon Sep 17 00:00:00 2001
From: tri <tri@thac.loan>
Date: Fri, 2 Jan 2026 00:20:23 +0700
Subject: [PATCH] increase blob limit from 64->256MiB; use zig 0.15.2

---
 README.md   |  2 +-
 src/git.zig | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 9f8919d..282ea61 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ It's a static site generator for your git repos - think [stagit][1], but `git cl
 
 ## Build
 
-We use zig master, which is 0.16.0-dev.393+dd4be26f5 at the time of writing:
+We use zig 0.15.2:
 
 ```sh
 # khoe is hosted on khoe
diff --git a/src/git.zig b/src/git.zig
index 7466b3d..7e09598 100644
--- a/src/git.zig
+++ b/src/git.zig
@@ -5,7 +5,7 @@ const Io = std.Io;
 const t = std.testing;
 
 pub fn findGitDir(arena: mem.Allocator, dir: fs.Dir) ![]const u8 {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .argv = &.{ "git", "rev-parse", "--git-dir" },
@@ -14,7 +14,7 @@ pub fn findGitDir(arena: mem.Allocator, dir: fs.Dir) ![]const u8 {
 }
 
 pub fn updateServerInfo(gpa: mem.Allocator, dir: fs.Dir) !void {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = gpa,
         .cwd_dir = dir,
         .argv = &.{ "git", "update-server-info" },
@@ -95,9 +95,9 @@ pub fn getLatestCommit(arena: mem.Allocator, dir: fs.Dir) !?Commit {
 
 pub fn getDescription(arena: mem.Allocator, git_dir: fs.Dir) ![]const u8 {
     const description = git_dir.readFileAlloc(
-        "description",
         arena,
-        .limited(4096),
+        "description",
+        4096,
     ) catch |err| {
         switch (err) {
             error.FileNotFound => return "",
@@ -110,7 +110,7 @@ pub fn getDescription(arena: mem.Allocator, git_dir: fs.Dir) ![]const u8 {
 
 /// If found, return the exact readme filename.
 pub fn findReadme(arena: mem.Allocator, dir: fs.Dir) !?[]const u8 {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         // can't run git-ls-files on bare repos, so use git-ls-tree instead:
@@ -138,7 +138,7 @@ pub fn findReadme(arena: mem.Allocator, dir: fs.Dir) !?[]const u8 {
 }
 
 pub fn readFileAlloc(arena: mem.Allocator, dir: fs.Dir, file_name: []const u8) ![]const u8 {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .argv = &.{
@@ -184,7 +184,7 @@ pub const Walker = struct {
 };
 
 pub fn walkTree(arena: mem.Allocator, dir: fs.Dir, tree_ref: []const u8) !Walker {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .max_output_bytes = 1024 * 1024 * 64,
@@ -225,7 +225,7 @@ pub fn walkTree(arena: mem.Allocator, dir: fs.Dir, tree_ref: []const u8) !Walker
 pub const ObjectType = enum { blob, commit, tree, other };
 
 pub fn objectType(arena: mem.Allocator, dir: fs.Dir, object_hash: []const u8) !ObjectType {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .max_output_bytes = 1024 * 1024 * 64,
@@ -269,10 +269,10 @@ pub fn isBinary(content: []const u8) bool {
 // TODO: instead of loading everything to memory, figure out how to stream
 // instead.
 pub fn catFile(arena: mem.Allocator, dir: fs.Dir, object_hash: []const u8) ![]const u8 {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
-        .max_output_bytes = 1024 * 1024 * 64,
+        .max_output_bytes = 1024 * 1024 * 256,
         .argv = &.{
             "git",
             "cat-file",
@@ -286,7 +286,7 @@ pub fn catFile(arena: mem.Allocator, dir: fs.Dir, object_hash: []const u8) ![]co
 
 pub fn show(arena: mem.Allocator, dir: fs.Dir, commit_hash: []const u8) ![]const u8 {
     // First get git's terminal output with color codes intact
-    var git_proc = try std.process.Child.run(.{
+    const git_proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .max_output_bytes = 1024 * 1024 * 64,
@@ -297,7 +297,7 @@ pub fn show(arena: mem.Allocator, dir: fs.Dir, commit_hash: []const u8) ![]const
 }
 
 pub fn formatPatch(arena: mem.Allocator, dir: fs.Dir, commit_hash: []const u8) ![]const u8 {
-    var proc = try std.process.Child.run(.{
+    const proc = try std.process.Child.run(.{
         .allocator = arena,
         .cwd_dir = dir,
         .max_output_bytes = 1024 * 1024 * 1024,
-- 
2.47.3

