╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │70 null; │ │71 defer if (target_repo_maybe) |*target_repo| target_repo.deinit(io, arena.child_allocator); │ │72 │ │73 - var target_branch = if (retained_patch.event.revision) |revision| revision.targetBranch() orelse "" else "";│ │74 - if (target_repo_maybe) |*target_repo| { │ │75 - if (target_branch.len == 0) { │ │76 - if (try ui.ResolvedRefOrOid(.xit, .{}).init(target_repo, io, aa, null, "")) |resolved| │ │77 - target_branch = resolved.value; │ │78 - } │ │79 - } │ │73 + const target_branch = retained_patch.event.target_branch; │ │74 │ │75 const retained_entry = Patches.PatchWithId{ │ │76 .id = try aa.dupe(u8, &id_hex), │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │78 .author = try ui.Author.initFromEmail(haxy_moment, arena, retained_patch.author_email),│ │79 .draft = fork_record.event.stage == .draft, │ │80 .fork_oid = try aa.dupe(u8, &fork_oid), │ │87 - .target_branch = try aa.dupe(u8, target_branch), │ │81 .fork_exists = true, │ │82 }; │ │83 var patch_data = try Patches.detailResult(aa, identity.identity, retained_entry); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │84 │ │85 if (target_repo_maybe) |*target_repo| switch (fork_record.event.stage) { │ │93 - .draft => if (try Patches.loadDraftEntry(.xit, .{}, arena, io, haxy_moment, &fork_repo, target_repo, id, target_branch)) |entry| {│ │86 + .draft => if (try Patches.loadDraftEntry(.xit, .{}, arena, io, haxy_moment, &fork_repo, target_repo, id)) |entry| { │ │87 patch_data = try Patches.detailResult(aa, identity.identity, entry); │ │88 patch_data.repo_source = target_source; │ │89 }, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 92 error.NotFound => patch_data, │ │ 93 else => |other| return other, │ │ 94 }; │ │102 - if (patch_data.selectedThread()) |entry| { │ │103 - patch_data.repo_source = target_source; │ │104 - if (entry.record.event.revision) |revision| { │ │105 - if (revision.targetBranch()) |branch| target_branch = branch; │ │106 - } │ │107 - } │ │ 95 + if (patch_data.selectedThread() != null) patch_data.repo_source = target_source;│ │ 96 }, │ │ 97 }; │ │ 98 patch_data.repo_id = target_id; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │122 const location = ui.RoutablePage.RepoLocation{ .fork = .{ │ │123 .identity = identity.identity, │ │124 .id = &id_hex, │ │137 - .target_branch = target_branch, │ │125 } }; │ │126 const files = try Files.init(.xit, .{}, arena, &fork_repo, io, arena.child_allocator, location, requested_ref, requested_value, files_path, files_line); │ │127 const commits = try Commits.init(.xit, .{}, arena, &fork_repo, io, arena.child_allocator, haxy_moment, location, requested_ref, requested_value, commits_content, commits_base_oid);│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯