╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ event.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2418 2419 while (try children_iter.next()) |*child_cursor| { 2420 const kv_pair = try child_cursor.readKeyValuePair(); 2421 const child_oid_int = kv_pair.hash; 2422 const pending_parent_cursor = try self.child_to_pending_parents.getCursor(child_oid_int) orelse return error.CursorNotFound; 2423 const pending_parent_count = try pending_parent_cursor.readUint(); 2424 2425 if (pending_parent_count <= 1) { 2426 _ = try self.child_to_pending_parents.remove(child_oid_int); 2427 const child_oid = hash.intToBytes(hash.HashInt(repo_opts.hash), child_oid_int); 2428 try self.ready_queue.append(.{ .bytes = &child_oid }); 2429 } else { 2430 try self.child_to_pending_parents.put(child_oid_int, .{ .uint = pending_parent_count - 1 }); 2431 } 2432 } 2433 } 2434 2435 fn readOidFromList(list: TempDB.ArrayList(.read_only), index: u64) ![hash.byteLen(repo_opts.hash)]u8 { 2436 const oid_cursor = try list.getCursor(index) orelse return error.CursorNotFound; 2437 var oid: [hash.byteLen(repo_opts.hash)]u8 = undefined; 2438 _ = try oid_cursor.readBytes(&oid); 2439 return oid; 2440 } 2441 }; 2442 } 2443