about summary refs log tree commit diff
path: root/src/exe.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/exe.zig')
-rw-r--r--src/exe.zig4
1 files changed, 2 insertions, 2 deletions
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);