╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │153 } │ │154 } │ │155 │ │156 - const commit_count: ?u64 = switch (repo_kind) { │ │157 - .git => null, │ │158 - .xit => blk: { │ │159 - const head_count = repo.commitCount(io, gpa, .{ .oid = &resolved.oid }) catch break :blk null;│ │160 - const base_oid = base_oid_maybe orelse break :blk head_count; │ │161 - const base_count = repo.commitCount(io, gpa, .{ .oid = &base_oid }) catch break :blk null; │ │162 - break :blk if (head_count >= base_count) head_count - base_count else null; │ │163 - }, │ │164 - }; │ │165 - │ │156 return .{ │ │157 .location = try location.dupe(aa), │ │158 .ref_or_oid = resolved.ref_or_oid, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │159 .ref_or_oid_value = resolved.value, │ │170 - .commit_count = commit_count, │ │160 + .commit_count = if (repo_kind == .xit and base_oid_maybe == null) │ │161 + repo.commitCount(io, gpa, .{ .oid = &resolved.oid }) catch null│ │162 + else │ │163 + null, │ │164 .commits = try aa.dupe(Commit, buf[0..count]), │ │165 .next_start = next_start, │ │166 .content = try pageContent(aa, content), │ ╰────────────────────────────────────────────────────────────────────────────────╯