Skip to documentation
SLOP

tiny.sql.decodeHistoryBranchUpstreamConfig

Reference tiny.sql decodeHistoryBranchUpstreamConfig

Defined in sync.

Called byCallssyncreadBranchUpstreamConfigtest sourcelib.sql.src.synctest: sync branch upstream config sto...private sourcelib.sql.src.sync.BranchUpstreamConfigReaderfinishprivate sourcelib.sql.src.sync.BranchUpstreamConfigReaderinitprivate sourcelib.sql.src.sync.BranchUpstreamConfigReaderreadBytesprivate sourcelib.sql.src.sync.BranchUpstreamConfigReaderreadCountprivate sourcelib.sql.src.sync.BranchUpstreamConfigReaderreadU32+2 moresyncdecodeBranchUpstreamConfig
Static calls · unresolved targets: 0 · external targets: 3.

Source

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

zig
pub fn decodeBranchUpstreamConfig(allocator: Allocator, bytes: []const u8) Error!BranchUpstreamConfig {    var reader = BranchUpstreamConfigReader.init(bytes);    if (try reader.readU32() != branch_upstream_config_magic) return error.InvalidBranchUpstreamConfig;    if (try reader.readU32() != branch_upstream_config_format_version) return error.InvalidBranchUpstreamConfig;    const count = try reader.readCount();    const upstreams = try allocator.alloc(BranchUpstreamEntry, count);    var read: usize = 0;    errdefer {        for (upstreams[0..read]) |*upstream| upstream.deinit(allocator);        if (upstreams.len != 0) allocator.free(upstreams);    }    for (upstreams) |*upstream| {        const branch_name = try reader.readBytes();        const remote_name = try reader.readBytes();        const remote_branch_name = try reader.readBytes();        upstream.* = try BranchUpstreamEntry.init(allocator, branch_name, remote_name, remote_branch_name);        read += 1;    }    try reader.finish();    try validateBranchUpstreamEntries(upstreams);    return .{        .allocator = allocator,        .upstreams = upstreams,    };}

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

zig
pub const decodeHistoryBranchUpstreamConfig = sync.decodeBranchUpstreamConfig;

Complete call list

7 direct calls.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433