╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#f73df683e8e96c67fffa6334c7f00992275f520d",│ │ 7 - .hash = "xit-0.0.0-Ub3nDDq-UgHURdPc5eJ4uICyD1iDQiWH1swXPtmlbZUP", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#2b79377fcd69ed2d17c364986e94dd2caff4ef0f",│ │ 7 + .hash = "xit-0.0.0-Ub3nDDXOUgHQX8hVG9Dd6qT6zZ1X-ALjVgofqY2CopM8", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │814 }; │ │815 } │ │816 try evt.consume(.repo, .xit, .{}, io, allocator, &template_repo, evt.events_ref, &discussion_comment_events);│ │817 + try template_repo.patchAll(io, allocator, null); │ │818 try template_repo.addConfig(io, allocator, .{ .name = "core.bare", .value = "true" }); │ │819 } │ │820 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1056 try writer.writer.print("{s} ({d}/{d})", .{ title, i + 1, contents.len }); │ │1057 source_oid = try fork_repo.commit(io, allocator, .{ .message = writer.written(), .timestamp = timestamp + i });│ │1058 } │ │1059 + try fork_repo.patchAll(io, allocator, null); │ │1060 try fork_repo.addConfig(io, allocator, .{ .name = "core.bare", .value = "true" }); │ │1061 try fork_dir.deleteFile(io, path); │ │1062 const revision_id = evt.EventWithId.randomId(random); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │557 for (inner.children.values()) |*child| child.widget.deinit(allocator); │ │558 inner.children.clearAndFree(allocator); │ │559 inner.getFocus().child_id = null; │ │560 - │ │561 - if (commit.stats) |stats| { │ │562 - const text = try std.fmt.allocPrint(self.session.page_arena.allocator(), "+{d}, -{d}", .{ stats.lines_added, stats.lines_removed }); │ │563 - var tb = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none, .label = " lines changed " });│ │564 - errdefer tb.deinit(allocator); │ │565 - tb.getFocus().mode = .all; │ │566 - try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │567 - } │ │560 │ │561 switch (self.paneContent(sel)) { │ │562 .message => { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │568 try self.addMessageBox(allocator, inner, commit, .preview); │ │569 if (commit.author != .unknown) { │ │570 var tb = try ui.authorBox(allocator, self.session.page_arena, commit.author); │ │571 + errdefer tb.deinit(allocator); │ │572 + try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │573 + } │ │574 + if (commit.stats) |stats| { │ │575 + var text: std.Io.Writer.Allocating = .init(allocator); │ │576 + defer text.deinit(); │ │577 + try text.writer.print("lines changed: {d}", .{stats.lines_added + stats.lines_changed}); │ │578 + if (stats.lines_removed != 0) try text.writer.print("\nlines removed: {d}", .{stats.lines_removed}); │ │579 + const bytes_added = stats.bytes_added >= stats.bytes_removed; │ │580 + const bytes = if (bytes_added) stats.bytes_added - stats.bytes_removed else stats.bytes_removed - stats.bytes_added; │ │581 + try text.writer.print("\nbytes {s}: {d}\nfiles changed: {d}", .{ │ │582 + if (bytes_added) "added" else "removed", bytes, stats.files_added + stats.files_changed, │ │583 + }); │ │584 + if (stats.files_removed != 0) try text.writer.print("\nfiles removed: {d}", .{stats.files_removed}); │ │585 + var tb = try wgt.TextBox.init(allocator, text.written(), .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none, .label = " stats " });│ │586 errdefer tb.deinit(allocator); │ │587 + tb.getFocus().mode = .all; │ │588 try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │589 } │ │590 try self.addViewFilesLink(allocator, inner, commit.oid); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯