╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │403 }; │ │404 defer allocator.free(repo_path); │ │405 │ │406 - if (try serveIfExists(repo_path, sess, io, allocator, parsed.service)) { │ │406 + if (try serveIfExists(repo_path, handler.repo_root_path, sess, io, allocator, parsed.service)) {│ │407 try sess.exit(0); │ │408 return; │ │409 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │413 // create the on-disk repo for the just-minted event and serve the push │ │414 var repo = try createRepo(any_repo_opts.toRepoOpts(), io, allocator, repo_path); │ │415 defer repo.deinit(io, allocator); │ │416 - try servePack(repo.self_repo_opts, &repo, sess, io, allocator, parsed.service); │ │416 + try servePack(repo.self_repo_opts, &repo, handler.repo_root_path, sess, io, allocator, parsed.service);│ │417 try sess.exit(0); │ │418 } │ │419 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │420 // serve an existing repo at `repo_path`, or return false if none is there│ │421 fn serveIfExists( │ │422 repo_path: []const u8, │ │423 + repo_root_path: []const u8, │ │424 sess: *ssh.SessionCtx, │ │425 io: std.Io, │ │426 allocator: std.mem.Allocator, │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │438 defer any_repo.deinit(io, allocator); │ │439 │ │440 switch (any_repo) { │ │440 - inline else => |*repo| try servePack(repo.self_repo_opts, repo, sess, io, allocator, service), │ │441 + inline else => |*repo| try servePack(repo.self_repo_opts, repo, repo_root_path, sess, io, allocator, service),│ │442 } │ │443 return true; │ │444 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────╮ │462 fn servePack( │ │463 comptime repo_opts: rp.RepoOpts(.xit),│ │464 repo: *rp.Repo(.xit, repo_opts), │ │465 + repo_root_path: []const u8, │ │466 sess: *ssh.SessionCtx, │ │467 io: std.Io, │ │468 allocator: std.mem.Allocator, │ ╰───────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │475 │ │476 switch (service) { │ │477 .upload_pack => try repo.uploadPack(io, allocator, &session_reader.interface, &session_writer.interface, .{}), │ │476 - .receive_pack => try evt.receivePackAndConsume(repo_opts, io, allocator, repo, &session_reader.interface, &session_writer.interface, .{}), │ │478 + .receive_pack => try evt.receivePackAndConsume(repo_opts, io, allocator, repo, &session_reader.interface, &session_writer.interface, .{}, repo_root_path),│ │479 } │ │480 │ │481 // flush whatever the pack op buffered into our writer adapter │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯