about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/fs.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 8eaf7c2..d6c182d 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -153,10 +153,12 @@ pub fn getGitTime(path: []const u8) !std.posix.timespec {
     try p.spawn();
     _ = try p.stdout.?.readAll(&buf);
     const result = try p.wait();
+
     std.debug.assert(result == .Exited and result.Exited == 0);
 
     // parse result as ulong
     const gitAuthorDate: c_ulong = c.strtoul(&buf, null, 10);
+    if (gitAuthorDate == 0) return error.NoGitTime;
 
     // calculate timespec
     return .{