╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │1049 - pub fn hasGitRemote(self: *Header.View) bool { │ │1050 - return self.gitRemote() != null; │ │1049 + pub fn hasCloneUrl(self: *Header.View) bool { │ │1050 + return self.cloneUrl() != null; │ │1051 } │ │1052 │ │1053 - fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │1053 + fn cloneUrl(self: *Header.View) ?*ui.CopyableText.View { │ │1054 for (self.box.children.values()) |*child| switch (child.widget) {│ │1055 - .git_remote => |*git_remote| return git_remote, │ │1055 + .copyable_text => |*copyable_text| return copyable_text, │ │1056 else => {}, │ │1057 }; │ │1058 return null; │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │579 } │ │580 return; │ │581 } │ │582 - if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │582 + if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(root_focus)) return; │ │583 if (self.detailActive()) { │ │584 try self.detailInput(key, root_focus); │ │585 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │749 // only the clone-url row sits directly below the repository header. │ │750 pub fn getSelectedIndex(self: *View) ?usize { │ │751 if (self.headerActive()) return 0; │ │752 - return if (self.header().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │752 + return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │753 } │ │754 │ │755 - pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │756 - return self.header().focusGitRemote(root_focus); │ │755 + pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │756 + return self.header().focusCloneUrl(root_focus); │ │757 } │ │758 }; │ │759 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │856 errdefer box.deinit(allocator); │ │857 │ │858 if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │859 - var git_remote = try ui.GitRemote.View.initClone(allocator, session, identity); │ │860 - errdefer git_remote.deinit(allocator); │ │861 - const min_width = git_remote.minWidth(); │ │862 - box.getFocus().child_id = git_remote.getFocus().id; │ │863 - try box.children.put(allocator, git_remote.getFocus().id, .{ .widget = .{ .git_remote = git_remote }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } }); │ │859 + var clone_url = try ui.CopyableText.View.initClone(allocator, session, identity); │ │860 + errdefer clone_url.deinit(allocator); │ │861 + const min_width = clone_url.minWidth(); │ │862 + box.getFocus().child_id = clone_url.getFocus().id; │ │863 + try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .copyable_text = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } });│ │864 } │ │865 │ │866 var spacer = try ui.Spacer.init(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │884 } │ │885 │ │886 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │887 - const git_remote = self.gitRemote() orelse return; │ │888 - try git_remote.input(allocator, key, root_focus); │ │887 + const clone_url = self.cloneUrl() orelse return; │ │888 + try clone_url.input(allocator, key, root_focus); │ │889 } │ │890 │ │891 - pub fn focusGitRemote(self: *Header.View, root_focus: *Focus) bool { │ │892 - const git_remote = self.gitRemote() orelse return false; │ │893 - root_focus.setFocus(git_remote.getFocus().id); │ │891 + pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { │ │892 + const clone_url = self.cloneUrl() orelse return false; │ │893 + root_focus.setFocus(clone_url.getFocus().id); │ │894 return true; │ │895 } │ │896 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │897 - pub fn hasGitRemote(self: *Header.View) bool { │ │898 - return self.gitRemote() != null; │ │897 + pub fn hasCloneUrl(self: *Header.View) bool { │ │898 + return self.cloneUrl() != null; │ │899 } │ │900 │ │901 - fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │901 + fn cloneUrl(self: *Header.View) ?*ui.CopyableText.View { │ │902 for (self.box.children.values()) |*child| switch (child.widget) {│ │903 - .git_remote => |*git_remote| return git_remote, │ │903 + .copyable_text => |*copyable_text| return copyable_text, │ │904 else => {}, │ │905 }; │ │906 return null; │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭─────────────────────────────────────────────────╮ │ 5 const xit = @import("xit"); │ │ 6 const rp = xit.repo; │ │ 7 const hash = xit.hash; │ │ 8 +const rf = xit.ref; │ │ 9 const diff3 = @import("../../diff3.zig"); │ │10 const Comment = @import("Comment.zig"); │ │11 const Attachment = @import("Attachment.zig");│ ╰─────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │38 attachments: []const Attachment.WithId = &.{},│ │39 draft: bool = false, │ │40 revision_ready: bool = false, │ │41 + fork_oid: []const u8 = "", │ │42 + target_branch: []const u8 = "", │ │43 + no_changes: bool = false, │ │44 }; │ │45 │ │46 pub const Entry = PatchWithId; │ ╰──────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────╮ │120 // (the web posts the new-patch form to the patch route instead).│ │121 repo_source: ?ui.RepoSource = null, │ │122 repo_id: ?[evt.event_id_size]u8 = null, │ │119 -target_branch: []const u8 = "", │ │123 │ │124 const Self = @This(); │ │125 │ ╰──────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────╮ │263 session: *ui.Session, │ │264 repo_id_maybe: ?[evt.event_id_size]u8,│ │265 identity: []const u8, │ │266 + target_branch: []const u8, │ │267 tag: []const u8, │ │268 selected_id: []const u8, │ │269 comment_id: []const u8, │ ╰───────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯