╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │43 const work_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "server", "admin" });│ │44 defer allocator.free(work_path); │ │45 │ │46 - const repo_opts: rp.RepoOpts(.xit) = .{ .is_test = true }; │ │46 + const repo_opts: rp.RepoOpts(.xit) = .{}; │ │47 const Repo = rp.Repo(.xit, repo_opts); │ │48 var repo = try Repo.init(io, allocator, .{ .path = work_path }); │ │49 defer repo.deinit(io, allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │50 + │ │51 + try repo.addConfig(io, allocator, .{ .name = "user.name", .value = "haxy" }); │ │52 + try repo.addConfig(io, allocator, .{ .name = "user.email", .value = "admin@haxy" });│ │53 │ │54 var session: ui.Session = undefined; │ │55 │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │170 }, │ │171 }, │ │172 }; │ │170 - } │ │171 - │ │172 - // insert users and repos as commits in the repo │ │173 - { │ │174 - var json: std.Io.Writer.Allocating = .init(allocator); │ │175 - defer json.deinit(); │ │176 - │ │177 - for (events_to_consume) |event| { │ │178 - json.clearRetainingCapacity(); │ │179 - │ │180 - try std.json.Stringify.value(event, .{}, &json.writer); │ │181 - │ │182 - // commit the event into a special branch │ │183 - _ = try repo.commitAtRef(io, allocator, .{ .message = json.written() }, null, .{ .kind = .head, .name = "haxy/meta" });│ │184 - } │ │173 } │ │174 │ │187 - // consume events into the database │ │188 - try evt.consume(repo_opts, io, allocator, &repo, .{ .kind = .head, .name = "haxy/meta" }); │ │175 + // commit the seed events and consume them into the database │ │176 + try evt.commitAndConsume(repo_opts, io, allocator, &repo, evt.events_ref, &events_to_consume); │ │177 │ │178 session = try ui.Session.init(repo_opts, &page_arena, &repo, .{}); │ │179 break :blk .{ .home = try .init(repo_opts, &page_arena, session.haxy_moment orelse unreachable) }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯