Skip to documentation
SLOP

tiny.sql.pullHistoryFastForward

Reference tiny.sql pullHistoryFastForward

Defined in sync.

Called byCallsrepositoryRepositorysyncpullFileFastForwardprivate sourcelib.sql.src.synccanFastForwardWithPacksyncexportMissingRefNamessyncimportObjectssyncpullFastForward
Static calls · unresolved targets: 0 · external targets: 4.

Source

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

zig
pub fn pullFastForward(allocator: Allocator, local: *history_mod.History, remote: *const history_mod.History, ref_name: []const u8) Error!Stats {    const ref_value = (try remote.ref(ref_name)) orelse return error.RefNotFound;    var names = [_][]const u8{ref_name};    var pack = try exportMissingRefNames(allocator, remote, local, names[0..]);    defer pack.deinit();    const expected = if ((try local.ref(ref_name))) |local_ref| local_ref.target else null;    if (expected) |local_target| {        if (!try canFastForwardWithPack(allocator, local, &pack, local_target, ref_value.target)) return error.NonFastForward;    }    var stats = try importObjects(local, &pack);    try local.putRefIfMatches(.{        .name = ref_name,        .target = ref_value.target,    }, expected);    stats.refs += 1;    return stats;}

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

zig
pub const pullHistoryFastForward = sync.pullFastForward;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433