authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-15 16:29:56 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-15 16:29:56 -07:00
log38a73efa769e538e3ac89c41bb315b345a88f06d
treec3f09d626ab6577aedf205bc34c83cedfc8b4b33
parentef8d303fd2efa79c645bdf221edbb1a0087271ca
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

re-remove the hint param from Tree.get


1 files changed, 7 insertions(+), 8 deletions(-)

git.zig+7-8
...@@ -1273,7 +1273,7 @@ pub const Repository = struct {...@@ -1273,7 +1273,7 @@ pub const Repository = struct {
1273 while (findFirstUnset(set, i)) |j| : (i += 1) {1273 while (findFirstUnset(set, i)) |j| : (i += 1) {
1274 i = j;1274 i = j;
1275 const k = result.keys()[i];1275 const k = result.keys()[i];
1276 const new = tree.get(k, base_tree.children[i].mode.type);1276 const new = tree.get(k);
1277 if (new == null) {1277 if (new == null) {
1278 found += 1;1278 found += 1;
1279 result.putAssumeCapacity(k, commit_id_prev);1279 result.putAssumeCapacity(k, commit_id_prev);
...@@ -1432,12 +1432,12 @@ pub const Repository = struct {...@@ -1432,12 +1432,12 @@ pub const Repository = struct {
1432 continue;1432 continue;
1433 },1433 },
1434 .lt => {1434 .lt => {
1435 const after_item = after_tree.get(before.name, before.mode.type) orelse {1435 const after_item = after_tree.get(before.name) orelse {
1436 try D.either(e, w, p, before);1436 try D.either(e, w, p, before);
1437 before_i += 1;1437 before_i += 1;
1438 continue;1438 continue;
1439 };1439 };
1440 const before_item = before_tree.get(after.name, after.mode.type) orelse {1440 const before_item = before_tree.get(after.name) orelse {
1441 try A.either(e, w, p, after);1441 try A.either(e, w, p, after);
1442 after_i += 1;1442 after_i += 1;
1443 continue;1443 continue;
...@@ -1460,12 +1460,12 @@ pub const Repository = struct {...@@ -1460,12 +1460,12 @@ pub const Repository = struct {
1460 comptime unreachable;1460 comptime unreachable;
1461 },1461 },
1462 .gt => {1462 .gt => {
1463 const before_item = before_tree.get(after.name, after.mode.type) orelse {1463 const before_item = before_tree.get(after.name) orelse {
1464 try A.either(e, w, p, after);1464 try A.either(e, w, p, after);
1465 after_i += 1;1465 after_i += 1;
1466 continue;1466 continue;
1467 };1467 };
1468 const after_item = after_tree.get(before.name, before.mode.type) orelse {1468 const after_item = after_tree.get(before.name) orelse {
1469 try D.either(e, w, p, before);1469 try D.either(e, w, p, before);
1470 before_i += 1;1470 before_i += 1;
1471 continue;1471 continue;
...@@ -1580,7 +1580,7 @@ fn traverseTo(r: *Repository, arena: std.mem.Allocator, treestart_id: TreeId, di...@@ -1580,7 +1580,7 @@ fn traverseTo(r: *Repository, arena: std.mem.Allocator, treestart_id: TreeId, di
1580 var iter = std.mem.splitScalar(u8, dir_path, '/');1580 var iter = std.mem.splitScalar(u8, dir_path, '/');
1581 while (iter.next()) |segment| {1581 while (iter.next()) |segment| {
1582 const tree = try r.getTreeA(arena, id.id);1582 const tree = try r.getTreeA(arena, id.id);
1583 const o = tree.get(segment, .directory) orelse return null;1583 const o = tree.get(segment) orelse return null;
1584 if (o.id != .tree) return null;1584 if (o.id != .tree) return null;
1585 id = o.id.tree;1585 id = o.id.tree;
1586 }1586 }
...@@ -1590,8 +1590,7 @@ fn traverseTo(r: *Repository, arena: std.mem.Allocator, treestart_id: TreeId, di...@@ -1590,8 +1590,7 @@ fn traverseTo(r: *Repository, arena: std.mem.Allocator, treestart_id: TreeId, di
1590pub const Tree = struct {1590pub const Tree = struct {
1591 children: []const Object,1591 children: []const Object,
15921592
1593 pub fn get(self: Tree, name: string, hint: Object.Type) ?Object {1593 pub fn get(self: Tree, name: string) ?Object {
1594 _ = hint;
1595 // modified std.sort.binarySearch1594 // modified std.sort.binarySearch
1596 const i = blk: {1595 const i = blk: {
1597 var low: usize = 0;1596 var low: usize = 0;