about summary refs log tree commit diff
path: root/src/gen.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen.zig')
-rw-r--r--src/gen.zig36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/gen.zig b/src/gen.zig
index aec72ca..ebd0bdb 100644
--- a/src/gen.zig
+++ b/src/gen.zig
@@ -6,42 +6,6 @@ const Context = @import("main.zig").Context;
 
 const log = std.log.scoped(.gen);
 
-pub fn fixMtimes(ctx: *Context) !void {
-    ctx.progress_start("Fix mtimes");
-    defer ctx.progress_end();
-
-    const Counter = std.atomic.Value(usize);
-    var counter = Counter.init(0);
-
-    const worker = struct {
-        fn func(wctx: *Context, wp: []const u8, wcounter: *Counter) !void {
-            var buf: [2 * std.os.linux.PATH_MAX]u8 = undefined;
-            var fba = std.heap.FixedBufferAllocator.init(&buf);
-
-            wctx.progress_start(wp);
-            defer wctx.progress_end();
-
-            const path = fs.joinPathAndFilename(fba.allocator(), &.{Context.params.PAGE_PATH}, &.{wp}) catch unreachable;
-            const mdpath = fs.replaceExtension(fba.allocator(), path, "md") catch unreachable;
-
-            std.fs.cwd().access(mdpath, .{}) catch {
-                // only set mtime from git if no markdown source is used
-                const ts = fs.getGitTime(path) catch return;
-                fs.setMtime(path, ts) catch unreachable;
-
-                _ = wcounter.fetchAdd(1, .monotonic);
-            };
-        }
-    };
-
-    try exe.WaitPool(
-        []const u8,
-        worker.func,
-    ).work(ctx, ctx.pages.items, .{&counter});
-
-    log.info("Retimed {d} pages.", .{counter.raw});
-}
-
 pub fn generate(ctx: *Context) !void {
     ctx.progress_start("generate");
     defer ctx.progress_end();