Skip to documentation
SLOP

tiny.sql.HistoryRemoteConfigEntry

Reference tiny.sql HistoryRemoteConfigEntry

Defined in sync.

API (8)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

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

zig
pub const RemoteConfigEntry = struct {    name: []u8,    history_path: []u8,    lock_path: ?[]u8 = null,    default_branch: ?[]u8 = null,    pub fn init(allocator: Allocator, name: []const u8, history_path: []const u8, lock_path: ?[]const u8) Error!RemoteConfigEntry {        return try initWithDefaultBranch(allocator, name, history_path, lock_path, null);    }    pub fn initWithDefaultBranch(allocator: Allocator, name: []const u8, history_path: []const u8, lock_path: ?[]const u8, default_branch: ?[]const u8) Error!RemoteConfigEntry {        if (!validRemoteName(name)) return error.InvalidRemoteName;        if (default_branch) |branch_name| {            if (branch_name.len == 0) return error.InvalidRemoteConfig;        }        const owned_name = try allocator.dupe(u8, name);        errdefer allocator.free(owned_name);        const owned_history_path = try allocator.dupe(u8, history_path);        errdefer allocator.free(owned_history_path);        const owned_lock_path = if (lock_path) |path| try allocator.dupe(u8, path) else null;        errdefer if (owned_lock_path) |path| allocator.free(path);        const owned_default_branch = if (default_branch) |branch_name| try allocator.dupe(u8, branch_name) else null;        errdefer if (owned_default_branch) |branch_name| allocator.free(branch_name);        return .{            .name = owned_name,            .history_path = owned_history_path,            .lock_path = owned_lock_path,            .default_branch = owned_default_branch,        };    }    pub fn deinit(self: *RemoteConfigEntry, allocator: Allocator) void {        allocator.free(self.name);        allocator.free(self.history_path);        if (self.lock_path) |path| allocator.free(path);        if (self.default_branch) |branch_name| allocator.free(branch_name);        self.* = undefined;    }    pub fn fileRemote(self: *const RemoteConfigEntry, io: std.Io, dir: std.Io.Dir) FileRemote {        return .{            .io = io,            .dir = dir,            .path = self.history_path,            .lock_path = self.lock_path,        };    }};

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

zig
pub const HistoryRemoteConfigEntry = sync.RemoteConfigEntry;
Called byCallsNo direct callstest sourcelib.sql.src.synctest: sync remote config stores named...HistoryRemoteConfigEntrydeinit
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.sql.src.synctest: sync remote config stores named...sync.RemoteConfigEntryinitWithDefaultBranchHistoryRemoteConfigEntryinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsprivate sourcelib.sql.src.repository.remoteOwnersync.RemoteConfiginitsync.RemoteConfigEntryinitsyncdecodeRemoteConfigtest sourcelib.sql.src.synctest: sync remote config stores named...private sourcelib.sql.src.syncvalidRemoteNameHistoryRemoteConfigEntryinitWithDefaultBranch
Static calls · unresolved targets: 0 · external targets: 2.

Audit

Definitions5
Public names10
Members4
Version26.7.0
Revisiondaab053ee433