Skip to documentation
SLOP

tiny.sql.encodeHistoryRemoteConfig

Reference tiny.sql encodeHistoryRemoteConfig

Defined in sync.

Called byCallssyncwriteRemoteConfigprivate sourcelib.sql.src.syncappendBytesprivate sourcelib.sql.src.syncappendCountprivate sourcelib.sql.src.syncappendU32private sourcelib.sql.src.syncappendU8private sourcelib.sql.src.syncvalidateRemoteEntriessyncencodeRemoteConfig
Static calls · unresolved targets: 0 · external targets: 2.

Source

Source: lib/sql/src/sync.zig:499

zig
pub fn encodeRemoteConfig(allocator: Allocator, config: *const RemoteConfig) Error![]u8 {    try validateRemoteEntries(config.remotes);    var bytes: std.ArrayList(u8) = .empty;    errdefer bytes.deinit(allocator);    try appendU32(allocator, &bytes, remote_config_magic);    try appendU32(allocator, &bytes, remote_config_format_version);    try appendCount(allocator, &bytes, config.remotes.len);    for (config.remotes) |remote| {        try appendBytes(allocator, &bytes, remote.name);        try appendBytes(allocator, &bytes, remote.history_path);        if (remote.lock_path) |lock_path| {            try appendU8(allocator, &bytes, 1);            try appendBytes(allocator, &bytes, lock_path);        } else {            try appendU8(allocator, &bytes, 0);        }        if (remote.default_branch) |default_branch| {            try appendU8(allocator, &bytes, 1);            try appendBytes(allocator, &bytes, default_branch);        } else {            try appendU8(allocator, &bytes, 0);        }    }    return try bytes.toOwnedSlice(allocator);}

Source: lib/sql/src/root.zig:116

zig
pub const encodeHistoryRemoteConfig = sync.encodeRemoteConfig;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433