╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ net.zig ──────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1765 var head_buffer: [rf.MAX_REF_CONTENT_SIZE]u8 = undefined; 1766 const head = try rf.readHead(.xit, opts, state.readOnly(), ctx.io, &head_buffer) orelse return error.HeadNotFound; 1767 ctx.result.* = try xit.object.writeCommit(.xit, opts, state, ctx.io, ctx.allocator, ctx.metadata, &tree, head.ref); 1768 try xit.undo.write(opts, state, std.Io.Timestamp.now(ctx.io, .real).toSeconds(), .{ .commit = try .init(ctx.metadata.message, ctx.result.*, opts.max_read_size) }); 1769 } 1770 }; 1771 try repo.core.db_file.lock(io, .exclusive); 1772 defer repo.core.db_file.unlock(io); 1773 const history = try R.DB.ArrayList(.read_write).init(repo.core.db.rootCursor()); 1774 try history.appendContext(.{ .slot = try history.getSlot(-1) }, Ctx{ 1775 .core = &repo.core, 1776 .io = io, 1777 .allocator = allocator, 1778 .files = files, 1779 .metadata = metadata, 1780 .result = &result, 1781 }); 1782 return result; 1783 } 1784