╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ fork.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
439 const moment = try evt.currentMoment(evt.admin_repo_opts, admin_repo); 440 const record = (try evt.Fork.readById(evt.AdminDB, evt.admin_repo_opts.hash, moment, &arena, &fork_id)) orelse return error.InvalidPatchDraft; 441 if (expected_user_id) |user_id| { 442 if (!std.mem.eql(u8, record.event.user_id, user_id)) return error.InvalidPatchDraft; 443 } 444 if (!record.removed) try evt.remove(.admin, .xit, evt.admin_repo_opts, io, allocator, admin_repo, &fork_id, .fork, author); 445 446 const path = try forkPath(allocator, repo_root_path, id); 447 defer allocator.free(path); 448 try std.Io.Dir.cwd().deleteTree(io, path); 449 } 450