╭ changed ───╮ │src/test.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │10 test "fetch small" { │ │11 const io = std.testing.io; │ │12 const allocator = std.testing.allocator; │ │13 - try testFetch(.xit, .xit, .{ .wire = .http }, 3004, io, allocator); │ │13 + try testFetch(.xit, .xit, .{ .wire = .http }, 3004, false, io, allocator); │ │14 + try testFetch(.xit, .xit, .{ .wire = .http }, 3005, true, io, allocator); │ │15 if (.windows != builtin.os.tag) { │ │15 - try testFetch(.xit, .xit, .{ .wire = .ssh }, 3006, io, allocator); │ │16 + try testFetch(.xit, .xit, .{ .wire = .ssh }, 3006, false, io, allocator);│ │17 } │ │18 } │ │19 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │20 test "push small" { │ │21 const io = std.testing.io; │ │22 const allocator = std.testing.allocator; │ │22 - try testPush(.xit, .xit, .{ .wire = .http }, 3010, io, allocator); │ │23 + try testPush(.xit, .xit, .{ .wire = .http }, 3010, false, io, allocator); │ │24 + try testPush(.xit, .xit, .{ .wire = .http }, 3011, true, io, allocator); │ │25 if (.windows != builtin.os.tag) { │ │24 - try testPush(.xit, .xit, .{ .wire = .ssh }, 3012, io, allocator); │ │26 + try testPush(.xit, .xit, .{ .wire = .ssh }, 3012, false, io, allocator);│ │27 } │ │28 } │ │29 │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │30 test "clone small" { │ │31 const io = std.testing.io; │ │32 const allocator = std.testing.allocator; │ │31 - try testClone(.xit, .xit, .{ .wire = .http }, 3016, false, io, allocator); │ │33 + try testClone(.xit, .xit, .{ .wire = .http }, 3016, false, false, io, allocator); │ │34 + try testClone(.xit, .xit, .{ .wire = .http }, 3017, false, true, io, allocator); │ │35 if (.windows != builtin.os.tag) { │ │33 - try testClone(.xit, .xit, .{ .wire = .ssh }, 3018, false, io, allocator); │ │36 + try testClone(.xit, .xit, .{ .wire = .ssh }, 3018, false, false, io, allocator);│ │37 } │ │38 } │ │39 │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │40 test "clone small subprocess" { │ │41 const io = std.testing.io; │ │42 const allocator = std.testing.allocator; │ │40 - try testClone(.git, .xit, .{ .wire = .http }, 3031, true, io, allocator); │ │43 + try testClone(.git, .xit, .{ .wire = .http }, 3031, true, false, io, allocator); │ │44 + try testClone(.git, .xit, .{ .wire = .http }, 3032, true, true, io, allocator); │ │45 if (.windows != builtin.os.tag) { │ │42 - try testClone(.git, .xit, .{ .wire = .ssh }, 3033, true, io, allocator); │ │46 + try testClone(.git, .xit, .{ .wire = .ssh }, 3033, true, false, io, allocator);│ │47 } │ │48 } │ │49 │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │50 test "fetch large" { │ │51 const io = std.testing.io; │ │52 const allocator = std.testing.allocator; │ │49 - try testFetchLarge(.git, .git, .{ .wire = .http }, 3019, false, io, allocator); │ │53 + try testFetchLarge(.git, .git, .{ .wire = .http }, 3019, false, false, io, allocator); │ │54 if (.windows != builtin.os.tag) { │ │51 - try testFetchLarge(.git, .git, .{ .wire = .ssh }, 3021, false, io, allocator); │ │55 + try testFetchLarge(.git, .git, .{ .wire = .ssh }, 3021, false, false, io, allocator);│ │56 } │ │57 } │ │58 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │59 test "fetch large subprocess" { │ │60 const io = std.testing.io; │ │61 const allocator = std.testing.allocator; │ │58 - try testFetchLarge(.git, .xit, .{ .wire = .http }, 3022, true, io, allocator); │ │62 + try testFetchLarge(.git, .xit, .{ .wire = .http }, 3022, true, false, io, allocator); │ │63 + try testFetchLarge(.git, .xit, .{ .wire = .http }, 3023, true, true, io, allocator); │ │64 if (.windows != builtin.os.tag) { │ │60 - try testFetchLarge(.git, .xit, .{ .wire = .ssh }, 3024, true, io, allocator); │ │65 + try testFetchLarge(.git, .xit, .{ .wire = .ssh }, 3024, true, false, io, allocator);│ │66 } │ │67 } │ │68 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │69 test "push large" { │ │70 const io = std.testing.io; │ │71 const allocator = std.testing.allocator; │ │67 - try testPushLarge(.git, .git, .{ .wire = .http }, 3025, false, io, allocator); │ │72 + try testPushLarge(.git, .git, .{ .wire = .http }, 3025, false, false, io, allocator); │ │73 if (.windows != builtin.os.tag) { │ │69 - try testPushLarge(.git, .git, .{ .wire = .ssh }, 3027, false, io, allocator); │ │74 + try testPushLarge(.git, .git, .{ .wire = .ssh }, 3027, false, false, io, allocator);│ │75 } │ │76 } │ │77 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │78 test "git push large subprocess" { │ │79 const io = std.testing.io; │ │80 const allocator = std.testing.allocator; │ │76 - try testPushLarge(.git, .xit, .{ .wire = .http }, 3028, true, io, allocator); │ │81 + try testPushLarge(.git, .xit, .{ .wire = .http }, 3028, true, false, io, allocator); │ │82 + try testPushLarge(.git, .xit, .{ .wire = .http }, 3029, true, true, io, allocator); │ │83 if (.windows != builtin.os.tag) { │ │78 - try testPushLarge(.git, .xit, .{ .wire = .ssh }, 3030, true, io, allocator); │ │84 + try testPushLarge(.git, .xit, .{ .wire = .ssh }, 3030, true, false, io, allocator);│ │85 } │ │86 } │ │87 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │90 comptime transport_def: net.TransportDefinition,│ │91 comptime temp_dir_name: []const u8, │ │92 comptime port: u16, │ │93 + comptime use_serve_command: bool, │ │94 ) type { │ │95 return struct { │ │96 core: Core, │ ╰────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │ 98 const Core = switch (transport_def) { │ │ 99 .file => void, │ │100 .wire => |wire_kind| switch (wire_kind) { │ │ 94 - .http => struct { │ │101 + .http => if (use_serve_command) struct {│ │102 + io: std.Io, │ │103 + allocator: std.mem.Allocator, │ │104 + process: ?std.process.Child, │ │105 + } else struct { │ │106 io: std.Io, │ │107 allocator: std.mem.Allocator, │ │108 temp_dir_name: []const u8, │ ╰─────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯