| ... | ... | @@ -1145,7 +1145,7 @@ pub const Repository = struct { |
| 1145 | 1145 | return null; |
| 1146 | 1146 | } |
| 1147 | 1147 | |
| 1148 | | pub fn getGitObject(r: *Repository, obj: Id, arena: std.mem.Allocator) !?GitObject { |
| 1148 | pub fn getGitObject(r: *Repository, arena: std.mem.Allocator, obj: Id) !?GitObject { |
| 1149 | 1149 | if (try r.getObject(obj, arena)) |data| { |
| 1150 | 1150 | const header = data[0..std.mem.indexOfScalar(u8, data, 0).?]; |
| 1151 | 1151 | const _type = header[0..std.mem.indexOfScalar(u8, header, ' ').?]; |
| ... | ... | @@ -1168,7 +1168,7 @@ pub const Repository = struct { |
| 1168 | 1168 | if (r.commits.getPtr(id.id)) |val| { |
| 1169 | 1169 | return .{ id, val.* }; |
| 1170 | 1170 | } |
| 1171 | | if (try r.getGitObject(id.id, arena)) |obj| { |
| 1171 | if (try r.getGitObject(arena, id.id)) |obj| { |
| 1172 | 1172 | if (obj.type == .commit) { |
| 1173 | 1173 | const commit = try parseCommit(arena, obj.content); |
| 1174 | 1174 | try r.commits.put(r.gpa, id.id, commit); |
| ... | ... | @@ -1182,7 +1182,7 @@ pub const Repository = struct { |
| 1182 | 1182 | if (r.trees.getPtr(id.id)) |val| { |
| 1183 | 1183 | return .{ id, val.* }; |
| 1184 | 1184 | } |
| 1185 | | if (try r.getGitObject(id.id, arena)) |obj| { |
| 1185 | if (try r.getGitObject(arena, id.id)) |obj| { |
| 1186 | 1186 | if (obj.type == .tree) { |
| 1187 | 1187 | var children = std.ArrayList(Tree.Object).init(r.gpa); |
| 1188 | 1188 | errdefer children.deinit(); |
| ... | ... | @@ -1229,7 +1229,7 @@ pub const Repository = struct { |
| 1229 | 1229 | if (r.tags.getPtr(id.id)) |val| { |
| 1230 | 1230 | return .{ id, val.* }; |
| 1231 | 1231 | } |
| 1232 | | if (try r.getGitObject(id.id, arena)) |obj| { |
| 1232 | if (try r.getGitObject(arena, id.id)) |obj| { |
| 1233 | 1233 | if (obj.type == .tag) { |
| 1234 | 1234 | const tag = try parseTag(obj.content); |
| 1235 | 1235 | try r.tags.put(r.gpa, id.id, tag); |