╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 }, │ │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),│ │416 + .push => |pusher| try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, repo, &reader.interface, &writer.interface, .{ │ │417 + .protocol_version = protocol_version, │ │418 + .protected_branches = pusher.protected_branches, │ │419 + .locked_branches = pusher.locked_branches, │ │420 + .pseudo_ref = .{ .name = push.clear_undo_ref, .deletable = pusher.owner }, │ │421 + }, pusher.author, &pusher.user_id, handler.server, handler.err, sess), │ │422 }, │ │423 } │ │424 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │456 var repo = try rp.Repo(.xit, any_repo_opts.toRepoOptsWithHash(kind)).open(io, allocator, .{ .path = repo_path }); │ │457 defer repo.deinit(io, allocator); │ │458 // stateless since the advertisement already went out │ │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); │ │459 + try push.receivePackAndConsume(repo.self_repo_opts, io, allocator, &repo, reader, writer, .{ .protocol_version = protocol_version, .is_stateless = true, .pseudo_ref = .{ .name = push.clear_undo_ref, .deletable = true } }, creator.owner, &creator.owner_id, handler.server, handler.err, sess);│ │460 }, │ │461 } │ │462 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────╮ │565 author: evt.CommitAuthor, │ │566 protected_branches: []const []const u8, │ │567 locked_branches: []const []const u8, │ │568 + // only owners may clear the undo history│ │569 + owner: bool, │ │570 }; │ │571 │ │572 // the owner of a repo a push may create │ ╰──────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │631 .author = try commitAuthor(moment, arena, &holder.id),│ │632 .protected_branches = if (owner) names else &.{}, │ │633 .locked_branches = if (owner) &.{} else names, │ │634 + .owner = owner, │ │635 } }; │ │636 }, │ │637 }, │ ╰───────────────────────────────────────────────────────────────────────────────╯