╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───╮ │src/push.zig│ ╰────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │216 if (err == error.CancelTransaction) return; │ │217 return err; │ │218 }; │ │219 + if (moment_index) |index| notify.deliverTransaction(io, allocator, server, repo_opts, repo, index, pusher_id, &sideband); │ │220 evt.bumpRepoActivityAt(io, allocator, server, repo.core.work_path); │ │221 │ │222 pch.refreshBranches(.{ .server = server }, .xit, repo_opts, io, allocator, repo, updates.items.items, &sideband) catch |err| {│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │361 // commit and index any new events │ │362 if (event_count > 0) { │ │363 try evt.commitEvents(.xit, repo_opts, state, ctx.io, ctx.allocator, evt.events_ref, events[0..event_count], null); │ │354 - if (!try evt.consumeInTransaction(.fork, .xit, repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, evt.events_ref)) return error.CancelTransaction;│ │364 + _ = try evt.consumeInTransaction(.fork, .xit, repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, evt.events_ref); │ │365 } │ │366 // the patch branch's file index lands with the push │ │367 _ = try find.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.sideband); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭────────────────────────────────────────────────────╮ │ 8 const serve_ssh = @import("./serve_ssh.zig"); │ │ 9 const serve_http = @import("./serve_http.zig"); │ │10 const evt = @import("./event.zig"); │ │11 -const notify = @import("./notify.zig"); │ │11 │ │12 pub const Options = struct { │ │13 http_listen: ?[]const u8 = "127.0.0.1:8080",│ ╰────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────╮ │81 }; │ │82 defer admin_repo.deinit(io, allocator); │ │83 } │ │85 - │ │86 - // the repos the notify worker has yet to look at │ │87 - var dirty_repos: notify.DirtyRepos = .{ .allocator = allocator };│ │88 - defer dirty_repos.deinit(); │ │84 │ │85 // create http listener │ │86 │ ╰─────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │114 .host_key = try serve_ssh_protocol.HostKey.loadOrGenerate(io, allocator, data_dir_path),│ │115 .session_handler = .{ │ │116 .admin_repo_path = admin_repo_path, │ │122 - .server = .{ .users_dir = users_dir, .dirty_repos = &dirty_repos }, │ │117 + .server = .{ .users_dir = users_dir, .admin_repo_path = admin_repo_path }, │ │118 .wui_port = wui_server.socket.address.getPort(), │ │119 .git_http_port = git_http_port, │ │120 .git_ssh_port = ssh_port, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │129 │ │130 var tasks: std.Io.Group = .init; │ │131 defer tasks.cancel(io); │ │137 - │ │138 - tasks.concurrent(io, notify.run, .{ &dirty_repos, io, allocator, users_dir, admin_repo_path }) catch |spawn_err| {│ │139 - serve_common.logError(io, err, "notify worker spawn failed: {s}\n", .{@errorName(spawn_err)}); │ │140 - }; │ │132 │ │133 // run listeners, printing the ports actually bound │ │134 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │152 runWebListener(io, allocator, &wui_server, &tasks, .{ .server = .{│ │153 .admin_repo_path = admin_repo_path, │ │154 .users_dir = users_dir, │ │164 - .dirty_repos = &dirty_repos, │ │155 .session_store = session_store, │ │156 .git_http_port = git_http_port, │ │157 .git_ssh_port = git_ssh_port, │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │238 // let page builders open on-disk repos │ │239 ui_session.io = io; │ │240 ui_session.users_dir = handler.server.users_dir; │ │241 - ui_session.dirty_repos = handler.server.dirty_repos; │ │241 ui_session.ssh_key = try authorizedKeyLine(session_arena.allocator(), sess.public_key);│ │242 try ui_session.logInWithSshKey(); │ │243 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │413 var sideband = progress.Sideband{ .writer = &writer.interface, .sess = sess }; │ │414 try repo.uploadPack(io, allocator, &reader.interface, &writer.interface, .{ .protocol_version = protocol_version }, &sideband); │ │415 }, │ │417 - .push => |pusher| try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, repo, &reader.interface, &writer.interface, .{ .protocol_version = protocol_version, .protected_branches = pusher.protected_branches, .locked_branches = pusher.locked_branches }, pusher.author, handler.server, handler.err, sess), │ │416 + .push => |pusher| try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, repo, &reader.interface, &writer.interface, .{ .protocol_version = protocol_version, .protected_branches = pusher.protected_branches, .locked_branches = pusher.locked_branches }, pusher.author, &pusher.user_id, handler.server, handler.err, sess),│ │417 }, │ │418 } │ │419 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │451 var repo = try rp.Repo(.xit, any_repo_opts.toRepoOptsWithHash(kind)).open(io, allocator, .{ .path = repo_path }); │ │452 defer repo.deinit(io, allocator); │ │453 // stateless since the advertisement already went out │ │455 - try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, &repo, reader, writer, .{ .protocol_version = protocol_version, .is_stateless = true }, creator.owner, handler.server, handler.err, sess); │ │454 + try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, &repo, reader, writer, .{ .protocol_version = protocol_version, .is_stateless = true }, creator.owner, &creator.owner_id, handler.server, handler.err, sess);│ │455 }, │ │456 } │ │457 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯