╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │234 const text, const truncated = try readMessage(repo_kind, repo_opts, aa, commit_object, full_message); │ │235 return .{ │ │236 .oid = try aa.dupe(u8, &commit_object.oid), │ │237 - .parent_oid = if (md.firstParent()) |parent| try aa.dupe(u8, parent) else "0" ** xit.hash.hexLen(repo_opts.hash), │ │237 + .parent_oid = if (md.firstParent()) |parent| try aa.dupe(u8, parent) else &@as([xit.hash.hexLen(repo_opts.hash)]u8, @splat('0')),│ │238 .date = try formatDate(aa, md.timestamp), │ │239 .message = text, │ │240 .message_truncated = truncated, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │301 const epoch_secs = std.time.epoch.EpochSeconds{ .secs = timestamp };│ │302 const year_day = epoch_secs.getEpochDay().calculateYearDay(); │ │303 const month_day = year_day.calculateMonthDay(); │ │304 - return std.fmt.allocPrint(arena, "{d:0>4}-{d:0>2}-{d:0>2}", .{ │ │304 + return arena.print("{d:0>4}-{d:0>2}-{d:0>2}", .{ │ │305 year_day.year, │ │306 month_day.month.numeric(), │ │307 month_day.day_index + 1, │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │630 var row = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │631 errdefer row.deinit(allocator); │ │632 const diff_route = self.data.handle.location.commitDiffRoute(commit.oid, commit.parent_oid) orelse return error.RouteTooLong;│ │633 - try addLink(allocator, &row, "view diff", try std.fmt.allocPrint(pa.allocator(), "a:{s}", .{try diff_route.toUrl(pa)})); │ │633 + try addLink(allocator, &row, "view diff", try pa.allocator().print("a:{s}", .{try diff_route.toUrl(pa)})); │ │634 try addLink(allocator, &row, "view files at this commit", try filesObjectLink(pa, self.data.handle.location, commit.oid)); │ │635 row.getFocus().child_id = row.children.keys()[0]; │ │636 try inner.children.put(allocator, row.getFocus().id, .{ .widget = .{ .box = row }, .rect = null, .min_size = null }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │637 } │ │638 if (commit.merge) if (self.data.handle.location.commitsMergeRoute(commit.oid)) |route| { │ │639 - try addLink(allocator, inner, "view commits from this merge", try std.fmt.allocPrint(pa.allocator(), "a:{s}", .{try route.toUrl(pa)}));│ │639 + try addLink(allocator, inner, "view commits from this merge", try pa.allocator().print("a:{s}", .{try route.toUrl(pa)})); │ │640 }; │ │641 if (commit.author != .unknown or commit.committer != .unknown) { │ │642 var row = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │811 fn commitsLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { │ │812 const route = data.handle.location.commitsRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong;│ │813 const url = try route.toUrl(page_arena); │ │814 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │814 + return page_arena.allocator().print("a:{s}", .{url}); │ │815 } │ │816 │ │817 // this list's page starting at `oid`: a repo's branch or tag keeps its ref (and │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │829 fn nextPageLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 {│ │830 const route = pageRoute(data, oid) orelse return error.RouteTooLong; │ │831 const url = try route.toUrl(page_arena); │ │832 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │832 + return page_arena.allocator().print("a:{s}", .{url}); │ │833 } │ │834 │ │835 // the "a:" link to the files tab at commit `oid` (an object ref), at its root │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │837 fn filesObjectLink(page_arena: *std.heap.ArenaAllocator, location: ui.RoutablePage.RepoLocation, oid: []const u8) ![]const u8 {│ │838 const route = location.filesRoute(.object, oid, "", 0) orelse return error.RouteTooLong; │ │839 const url = try route.toUrl(page_arena); │ │840 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │840 + return page_arena.allocator().print("a:{s}", .{url}); │ │841 } │ │842 │ │843 // the in-page "ai:" anchor for selecting a commit, showing its whole message │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │847 // survives following the row │ │848 if (data.search != null) { │ │849 const route = pageRoute(data, commit.oid) orelse return error.RouteTooLong; │ │850 - return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{try route.toUrl(page_arena)});│ │850 + return page_arena.allocator().print("ai:{s}", .{try route.toUrl(page_arena)}); │ │851 } │ │852 const route = (if (message) │ │853 data.handle.location.commitMessageRoute(.object, commit.oid, data.base_oid) │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │854 else │ │855 data.handle.location.commitsRoute(.object, commit.oid, data.base_oid)) orelse return error.RouteTooLong;│ │856 const url = try route.toUrl(page_arena); │ │857 - return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{url}); │ │857 + return page_arena.allocator().print("ai:{s}", .{url}); │ │858 } │ │859 │ │860 // the "a:" link to the page showing `oid`'s message on its own. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │861 fn messageLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { │ │862 const route = data.handle.location.commitMessageRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong;│ │863 const url = try route.toUrl(page_arena); │ │864 - return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │864 + return page_arena.allocator().print("a:{s}", .{url}); │ │865 } │ │866 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯