╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1719 - const start = params.start() orelse return null; │ │1708 const ref = (params.ref() catch return null) orelse { │ │1721 - if (search.len != 0 or from.len != 0) return null; │ │1722 - const file = pathValue(segments.rest()) orelse return null; │ │1723 - return if (file.len == 0) repoCommitsRoute(pair, null, "", start, "", base_oid) else null;│ │1709 + if (search.len != 0 or from.len != 0 or segments.rest().len != 0) return null; │ │1710 + return repoCommitsRoute(pair, null, "", base_oid); │ │1711 }; │ │1712 // the index covers branch and tag tips, so only they can be │ │1713 // searched or paged by commit; an object roots the list itself │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1714 if ((search.len != 0 or from.len != 0) and ref.kind == .object) return null; │ │1728 - // the message page has no diff window or file filter │ │1715 var route = if (std.mem.eql(u8, segments.rest(), message_seg)) │ │1730 - (if (start == 0) repoCommitMessageRoute(pair, ref.kind, ref.value, base_oid) else null) orelse return null │ │1716 + repoCommitMessageRoute(pair, ref.kind, ref.value, base_oid) orelse return null │ │1717 + else if (segments.rest().len == 0) │ │1718 + repoCommitsRoute(pair, ref.kind, ref.value, base_oid) orelse return null │ │1719 else │ │1732 - repoCommitsRoute(pair, ref.kind, ref.value, start, pathValue(segments.rest()) orelse return null, base_oid) orelse return null;│ │1720 + return null; │ │1721 if (search.len != 0) route.repo_commits.search = Array(search_route_max_len).from(search) orelse return null; │ │1722 if (from.len != 0) route.repo_commits.from = Array(ref_route_max_len).from(from) orelse return null; │ │1723 return route; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1761 std.mem.eql(u8, a_c.search.slice(), b.repo_commits.search.slice()) and │ │1762 std.mem.eql(u8, a_c.from.slice(), b.repo_commits.from.slice()) and │ │1763 std.mem.eql(u8, a_c.merge.slice(), b.repo_commits.merge.slice()) and │ │1776 - switch (a_c.content) { │ │1777 - .diff => |a_d| switch (b.repo_commits.content) { │ │1778 - .diff => |b_d| a_d.start == b_d.start and std.mem.eql(u8, a_d.path.slice(), b_d.path.slice()),│ │1779 - .message => false, │ │1780 - }, │ │1781 - .message => std.meta.activeTag(b.repo_commits.content) == .message, │ │1782 - }, │ │1764 + a_c.message == b.repo_commits.message, │ │1765 .repo_diff => |a_d| std.mem.eql(u8, a_d.name.slice(), b.repo_diff.name.slice()) and │ │1766 a_d.ref_or_oid == b.repo_diff.ref_or_oid and │ │1767 std.mem.eql(u8, a_d.value.slice(), b.repo_diff.value.slice()) and │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1806 .fork_patch => |a_f| std.mem.eql(u8, a_f.name.slice(), b.fork_patch.name.slice()) and std.mem.eql(u8, a_f.id.slice(), b.fork_patch.id.slice()),│ │1807 .fork_diff => |a_d| std.mem.eql(u8, a_d.fork.name.slice(), b.fork_diff.fork.name.slice()) and │ │1808 std.mem.eql(u8, a_d.fork.id.slice(), b.fork_diff.fork.id.slice()) and │ │1809 + std.mem.eql(u8, a_d.oid.slice(), b.fork_diff.oid.slice()) and │ │1810 + std.mem.eql(u8, a_d.base_oid.slice(), b.fork_diff.base_oid.slice()) and │ │1811 a_d.start == b.fork_diff.start and std.mem.eql(u8, a_d.path.slice(), b.fork_diff.path.slice()), │ │1812 .fork_files => |a_f| std.mem.eql(u8, a_f.fork.name.slice(), b.fork_files.fork.name.slice()) and │ │1813 std.mem.eql(u8, a_f.fork.id.slice(), b.fork_files.fork.id.slice()) and │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1818 .fork_commits => |a_c| std.mem.eql(u8, a_c.fork.name.slice(), b.fork_commits.fork.name.slice()) and │ │1819 std.mem.eql(u8, a_c.fork.id.slice(), b.fork_commits.fork.id.slice()) and │ │1820 std.mem.eql(u8, a_c.oid.slice(), b.fork_commits.oid.slice()) and │ │1837 - switch (a_c.content) { │ │1838 - .diff => |a_d| switch (b.fork_commits.content) { │ │1839 - .diff => |b_d| a_d.start == b_d.start and std.mem.eql(u8, a_d.path.slice(), b_d.path.slice()), │ │1840 - .message => false, │ │1841 - }, │ │1842 - .message => std.meta.activeTag(b.fork_commits.content) == .message, │ │1843 - }, │ │1821 + a_c.message == b.fork_commits.message, │ │1822 .fork_new_repo => |a_f| std.mem.eql(u8, a_f.name.slice(), b.fork_new_repo.name.slice()) and std.mem.eql(u8, a_f.id.slice(), b.fork_new_repo.id.slice()),│ │1823 .fork_new_user => |a_f| std.mem.eql(u8, a_f.name.slice(), b.fork_new_user.name.slice()) and std.mem.eql(u8, a_f.id.slice(), b.fork_new_user.id.slice()),│ │1824 .fork_auth => |a_f| std.mem.eql(u8, a_f.name.slice(), b.fork_auth.name.slice()) and std.mem.eql(u8, a_f.id.slice(), b.fork_auth.id.slice()), │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯