From ec926ff81334a7a6def0bc99b88301febd2ede7c Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sat, 6 May 2023 16:11:51 -0700 Subject: [PATCH] parseCommit: handle commits with no message --- git.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.zig b/git.zig index acc6ab967a8d5ea57c6a1a70a93fe88bfba63efd..88f5b3b68eb76b5c9176caf4c0cfe6bd5b5c127a 100644 --- a/git.zig +++ b/git.zig @@ -114,7 +114,7 @@ pub fn parseCommit(alloc: std.mem.Allocator, commitfile: string) !Commit { var parents = std.ArrayList(CommitId).init(alloc); errdefer parents.deinit(); while (true) { - const line = iter.next().?; + const line = iter.next() orelse break; if (line.len == 0) break; const space = std.mem.indexOfScalar(u8, line, ' ').?; const k = line[0..space]; -- 2.54.0