Skip to documentation
SLOP

tiny.sql.HistoryBranchUpstreamConfig

Reference tiny.sql HistoryBranchUpstreamConfig

Defined in sync.

API (5)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callssyncBranchUpstreamConfig
Static calls · unresolved targets: unknown · external targets: unknown.

Source

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

zig
pub const BranchUpstreamConfig = struct {    allocator: Allocator,    upstreams: []BranchUpstreamEntry,    pub fn init(allocator: Allocator, upstreams: []const BranchUpstreamEntry) Error!BranchUpstreamConfig {        try validateBranchUpstreamEntries(upstreams);        const owned = try allocator.alloc(BranchUpstreamEntry, upstreams.len);        var count: usize = 0;        errdefer {            for (owned[0..count]) |*upstream| upstream.deinit(allocator);            if (owned.len != 0) allocator.free(owned);        }        for (upstreams, owned) |upstream, *target| {            target.* = try BranchUpstreamEntry.init(allocator, upstream.branch, upstream.remote, upstream.remote_branch);            count += 1;        }        return .{            .allocator = allocator,            .upstreams = owned,        };    }    pub fn deinit(self: *BranchUpstreamConfig) void {        for (self.upstreams) |*upstream| upstream.deinit(self.allocator);        if (self.upstreams.len != 0) self.allocator.free(self.upstreams);        self.* = undefined;    }    pub fn find(self: *const BranchUpstreamConfig, branch_name: []const u8) ?*const BranchUpstreamEntry {        for (self.upstreams) |*upstream| {            if (std.mem.eql(u8, upstream.branch, branch_name)) return upstream;        }        return null;    }};

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

zig
pub const HistoryBranchUpstreamConfig = sync.BranchUpstreamConfig;
Called byCallsNo direct callstest sourcelib.sql.src.synctest: sync branch upstream config sto...HistoryBranchUpstreamConfigdeinit
Static calls · unresolved targets: 1 · external targets: 1.
Called byCallstest sourcelib.sql.src.synctest: sync branch upstream config sto...sync.BranchUpstreamEntryinitprivate sourcelib.sql.src.syncvalidateBranchUpstreamEntriesHistoryBranchUpstreamConfiginit
Static calls · unresolved targets: 0 · external targets: 3.

Audit

Definitions4
Public names8
Members2
Version26.7.0
Revisiondaab053ee433