╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │246 owner_name = ""; │ │247 } else { │ │248 const haxy_moment = session.haxy_moment orelse return error.NoMoment; │ │249 - const found = (try evt.Repo.readByOwnerAndName(DB, hash_kind, haxy_moment, arena, repo_identity.owner, repo_identity.name)) orelse return error.NotFound; │ │249 + const io = session.io orelse return error.NoMoment; │ │250 + const repos_dir = session.repos_dir orelse return error.NoMoment; │ │251 + const found = (try evt.readRepoByOwnerAndName(io, arena.child_allocator, arena, haxy_moment, repos_dir, repo_identity.owner, repo_identity.name)) orelse return error.NotFound;│ │252 // a repo the session can't read doesn't exist to it │ │253 if (evt.Repo.roleOf(found.repo, session.userId()) == .none) return error.NotFound; │ │254 repo = found.repo; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │260 owner_name = owner.event.name; │ │261 │ │262 // the repo's working copy lives at <repos_dir>/<hex event id>. │ │261 - if (session.repos_dir) |repos_dir| { │ │262 - const hex = std.fmt.bytesToHex(found.event_id, .lower); │ │263 - source = .{ │ │264 - .path = try std.fs.path.join(arena.allocator(), &.{ repos_dir, &hex }),│ │265 - .repo_kind = .xit, │ │266 - }; │ │267 - } │ │263 + const hex = std.fmt.bytesToHex(found.event_id, .lower); │ │264 + source = .{ │ │265 + .path = try std.fs.path.join(arena.allocator(), &.{ repos_dir, &hex }), │ │266 + .repo_kind = .xit, │ │267 + }; │ │268 } │ │269 │ │270 // open the repo once for every tab. files and changes share a ref or revision. │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯