╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │403 }; │ │404 defer allocator.free(repo_path); │ │405 │ │406 - if (try serveIfExists(repo_path, handler.repo_root_path, sess, io, allocator, parsed.service)) { │ │406 + if (try serveIfExists(repo_path, handler.repo_root_path, sess, io, allocator, parsed.service, handler.err)) {│ │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, handler.repo_root_path, sess, io, allocator, parsed.service); │ │416 + try servePack(repo.self_repo_opts, &repo, handler.repo_root_path, sess, io, allocator, parsed.service, handler.err);│ │417 try sess.exit(0); │ │418 } │ │419 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │425 io: std.Io, │ │426 allocator: std.mem.Allocator, │ │427 service: GitService, │ │428 + error_writer: *std.Io.Writer, │ │429 ) !bool { │ │430 // a bare open() creates the directory while probing for the repo, so only│ │431 // attempt it when the path already exists │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │439 defer any_repo.deinit(io, allocator); │ │440 │ │441 switch (any_repo) { │ │441 - inline else => |*repo| try servePack(repo.self_repo_opts, repo, repo_root_path, sess, io, allocator, service), │ │442 + inline else => |*repo| try servePack(repo.self_repo_opts, repo, repo_root_path, sess, io, allocator, service, error_writer),│ │443 } │ │444 return true; │ │445 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │452 ) !rp.Repo(.xit, repo_opts) { │ │453 var repo = try rp.Repo(.xit, repo_opts).init(io, allocator, .{ .path = repo_path }); │ │454 errdefer repo.deinit(io, allocator); │ │455 + try repo.setMergeAlgorithm(io, allocator, .diff3); │ │456 try repo.addConfig(io, allocator, .{ .name = "http.receivepack", .value = "true" }); │ │457 try repo.addConfig(io, allocator, .{ .name = "receive.denycurrentbranch", .value = "updateinstead" });│ │458 return repo; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │469 io: std.Io, │ │470 allocator: std.mem.Allocator, │ │471 service: GitService, │ │472 + error_writer: *std.Io.Writer, │ │473 ) !void { │ │474 var session_reader_buf: [4096]u8 = undefined;│ │475 var session_writer_buf: [4096]u8 = undefined;│ ╰──────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │478 │ │479 switch (service) { │ │480 .upload_pack => try repo.uploadPack(io, allocator, &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), │ │481 + .receive_pack => try evt.receivePackAndConsume(repo_opts, io, allocator, repo, &session_reader.interface, &session_writer.interface, .{}, repo_root_path, error_writer),│ │482 } │ │483 │ │484 // flush whatever the pack op buffered into our writer adapter │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯