From 973e5fdb82e0037ba5fc2ff74cf40d32a0e3466b Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Fri, 17 Oct 2025 22:51:16 +0200 Subject: get mtime from git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit but fallback to mtime anyway Signed-off-by: Robert Günzler --- src/exe.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/exe.zig') diff --git a/src/exe.zig b/src/exe.zig index e0cb7ef..ae5cfdd 100644 --- a/src/exe.zig +++ b/src/exe.zig @@ -37,8 +37,8 @@ fn pandocWorker(ctx: *Context, page: []const u8) !void { defer ctx.allocator().free(target_path); // get mtime of the source document - const mtime = try fs.getMtime(source_path); - const mtime_str = try fs.formatMtime(ctx.allocator(), mtime, "%s"); + const mtime = try (fs.getGitTime(source_path) catch fs.getMtime(source_path)); + const mtime_str = try fs.formatTimespec(ctx.allocator(), mtime, "%s"); defer ctx.allocator().free(mtime_str); const f = try fs.FileSwapper.createAt(ctx.allocator(), target_path); -- cgit 1.4.1