Skip to documentation
SLOP

tiny.sql.decodeHistoryRemoteConfig

Reference tiny.sql decodeHistoryRemoteConfig

Defined in sync.

Called byCallssyncreadRemoteConfigtest sourcelib.sql.src.synctest: sync remote config stores named...sync.RemoteConfigEntryinitWithDefaultBranchprivate sourcelib.sql.src.sync.RemoteConfigReaderfinishprivate sourcelib.sql.src.sync.RemoteConfigReaderinitprivate sourcelib.sql.src.sync.RemoteConfigReaderreadBytesprivate sourcelib.sql.src.sync.RemoteConfigReaderreadCount+3 moresyncdecodeRemoteConfig
Static calls · unresolved targets: 0 · external targets: 3.

Source

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

zig
pub fn decodeRemoteConfig(allocator: Allocator, bytes: []const u8) Error!RemoteConfig {    var reader = RemoteConfigReader.init(bytes);    if (try reader.readU32() != remote_config_magic) return error.InvalidRemoteConfig;    const format_version = try reader.readU32();    if (format_version != 1 and format_version != remote_config_format_version) return error.InvalidRemoteConfig;    const count = try reader.readCount();    const remotes = try allocator.alloc(RemoteConfigEntry, count);    var read: usize = 0;    errdefer {        for (remotes[0..read]) |*remote| remote.deinit(allocator);        if (remotes.len != 0) allocator.free(remotes);    }    for (remotes) |*remote| {        const name = try reader.readBytes();        const history_path = try reader.readBytes();        const lock_path = switch (try reader.readU8()) {            0 => null,            1 => try reader.readBytes(),            else => return error.InvalidRemoteConfig,        };        const default_branch = if (format_version >= 2) switch (try reader.readU8()) {            0 => null,            1 => try reader.readBytes(),            else => return error.InvalidRemoteConfig,        } else null;        remote.* = try RemoteConfigEntry.initWithDefaultBranch(allocator, name, history_path, lock_path, default_branch);        read += 1;    }    try reader.finish();    try validateRemoteEntries(remotes);    return .{        .allocator = allocator,        .remotes = remotes,    };}

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

zig
pub const decodeHistoryRemoteConfig = sync.decodeRemoteConfig;

Complete call list

8 direct calls.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433