╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ net.zig ──────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1727 defer tree.deinit(); 1728 var head_buffer: [rf.MAX_REF_CONTENT_SIZE]u8 = undefined; 1729 const head = try rf.readHead(.xit, opts, state.readOnly(), ctx.io, &head_buffer) orelse return error.HeadNotFound; 1730 ctx.result.* = try xit.object.writeCommit(.xit, opts, state, ctx.io, ctx.allocator, ctx.metadata, &tree, head.ref); 1731 try xit.undo.writeMessage(opts, state, .{ .commit = ctx.metadata }); 1732 } 1733 }; 1734 try repo.core.db_file.lock(io, .exclusive); 1735 defer repo.core.db_file.unlock(io); 1736 const history = try R.DB.ArrayList(.read_write).init(repo.core.db.rootCursor()); 1737 try history.appendContext(.{ .slot = try history.getSlot(-1) }, Ctx{ 1738 .core = &repo.core, 1739 .io = io, 1740 .allocator = allocator, 1741 .files = files, 1742 .metadata = metadata, 1743 .result = &result, 1744 }); 1745 return result; 1746 } 1747