tiny.sql.encodeHistoryRemoteConfig
Defined in sync.
Source
Source: lib/sql/src/sync.zig:499
zig
pub fn encodeRemoteConfig(allocator: Allocator, config: *const RemoteConfig) Error![]u8 { try validateRemoteEntries(config.remotes); var bytes: std.ArrayList(u8) = .empty; errdefer bytes.deinit(allocator); try appendU32(allocator, &bytes, remote_config_magic); try appendU32(allocator, &bytes, remote_config_format_version); try appendCount(allocator, &bytes, config.remotes.len); for (config.remotes) |remote| { try appendBytes(allocator, &bytes, remote.name); try appendBytes(allocator, &bytes, remote.history_path); if (remote.lock_path) |lock_path| { try appendU8(allocator, &bytes, 1); try appendBytes(allocator, &bytes, lock_path); } else { try appendU8(allocator, &bytes, 0); } if (remote.default_branch) |default_branch| { try appendU8(allocator, &bytes, 1); try appendBytes(allocator, &bytes, default_branch); } else { try appendU8(allocator, &bytes, 0); } } return try bytes.toOwnedSlice(allocator);}Source: lib/sql/src/root.zig:116
zig
pub const encodeHistoryRemoteConfig = sync.encodeRemoteConfig;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |