| ... | @@ -1092,17 +1092,17 @@ fn initResource(f: *Fetch, uri: std.Uri, resource: *Resource, reader_buffer: []u | ... | @@ -1092,17 +1092,17 @@ fn initResource(f: *Fetch, uri: std.Uri, resource: *Resource, reader_buffer: []u |
| 1092 | | 1092 | |
| 1093 | var want_oid_buf: [git.Oid.max_formatted_length]u8 = undefined; | 1093 | var want_oid_buf: [git.Oid.max_formatted_length]u8 = undefined; |
| 1094 | _ = std.fmt.bufPrint(&want_oid_buf, "{f}", .{want_oid}) catch unreachable; | 1094 | _ = std.fmt.bufPrint(&want_oid_buf, "{f}", .{want_oid}) catch unreachable; |
| 1095 | var fetch_stream: git.Session.FetchStream = undefined; | | |
| 1096 | session.fetch(&fetch_stream, &.{&want_oid_buf}, reader_buffer) catch |err| { | | |
| 1097 | return f.fail(f.location_tok, try eb.printString("unable to create fetch stream: {t}", .{err})); | | |
| 1098 | }; | | |
| 1099 | errdefer fetch_stream.deinit(); | | |
| 1100 | | | |
| 1101 | resource.* = .{ .git = .{ | 1095 | resource.* = .{ .git = .{ |
| 1102 | .session = session, | 1096 | .session = session, |
| 1103 | .fetch_stream = fetch_stream, | 1097 | .fetch_stream = undefined, |
| 1104 | .want_oid = want_oid, | 1098 | .want_oid = want_oid, |
| 1105 | } }; | 1099 | } }; |
| | 1100 | const fetch_stream = &resource.git.fetch_stream; |
| | 1101 | session.fetch(fetch_stream, &.{&want_oid_buf}, reader_buffer) catch |err| { |
| | 1102 | return f.fail(f.location_tok, try eb.printString("unable to create fetch stream: {t}", .{err})); |
| | 1103 | }; |
| | 1104 | errdefer fetch_stream.deinit(fetch_stream); |
| | 1105 | |
| 1106 | return; | 1106 | return; |
| 1107 | } | 1107 | } |
| 1108 | | 1108 | |