pub struct Config {Show 19 fields
pub user_identity: String,
pub user_name: String,
pub user_email: String,
pub trusted_remote_endpoint: String,
pub signing_key: String,
pub default_branch: String,
pub remote_endpoint: String,
pub remote_bucket: String,
pub remote_type: String,
pub ssh_strict_host_key_checking: String,
pub ssh_user_known_hosts_file: String,
pub ssh_identity_file: String,
pub signer: String,
pub key: KeyConfig,
pub attest: AttestConfig,
pub remotes: BTreeMap<String, RemoteEntry>,
pub branch_upstreams: BTreeMap<String, Upstream>,
pub durability_objects: String,
pub core: BTreeMap<String, String>,
}Expand description
Full in-memory representation of merged config (user + repo +
defaults). All fields default to empty / documented defaults;
readers that want a known-good default file should call
read_or_default.
Fields§
§user_identity: StringHex-encoded Identity: [kind:u8][len:u16 LE][bytes]. Empty =
derive from the signing key’s public key at commit time.
user_name: StringGit-compatibility alias user.name. Non-authoritative: stored
and round-tripped for parity with git config user.name, but it
NEVER feeds the cryptographic commit author (which is
user_identity / the signing key). Repo-safe.
user_email: StringGit-compatibility alias user.email. Non-authoritative, exactly
like user_name — never feeds the signed author.
trusted_remote_endpoint: StringExact remote endpoint the user has explicitly trusted for ambient HTTP/S3 environment credentials. User-scoped only.
signing_key: String§default_branch: String§remote_endpoint: String§remote_bucket: String§remote_type: String§ssh_strict_host_key_checking: String§ssh_user_known_hosts_file: String§ssh_identity_file: String§signer: StringCommit-signing selector. User-scoped only.
key: KeyConfig[key] section. User-scoped keystore selectors.
attest: AttestConfig[attest] section. Separate struct so new attest knobs don’t
balloon the flat Config.
remotes: BTreeMap<String, RemoteEntry>Named remotes keyed by name (remote.<name>.url /
remote.<name>.type). Repo-safe — addresses, same class as the
flat remote_endpoint. The legacy flat remote_endpoint /
remote_type act as the implicit default remote.
branch_upstreams: BTreeMap<String, Upstream>Per-branch upstream tracking keyed by local branch name
(branch.<branch>.remote / branch.<branch>.merge). Repo-safe.
durability_objects: StringObject-store durability schedule: empty/batch (default) =
batched commit-time flushes; per-object = strict historical
full-flush-per-object schedule (SPEC-OBJECTS §10.1’s stricter
conforming option). Repo-safe: the non-default value only
STRENGTHENS durability (and slows writes); it cannot weaken
anything.
core: BTreeMap<String, String>Allowlisted, inert core.* git-compat keys (see
CORE_ALLOWED_KEYS). Accepted and round-tripped for parity but
not honored by mkit — they are cosmetic settings git stores
per-repo. Dangerous core.* keys (CORE_DENIED_KEYS) are rejected
rather than stored. Keyed by the bare suffix (e.g. autocrlf).
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Return a Config with documented defaults filled in.
Source§impl Config
Validate that a key-file path (signing_key, attest.*_key_path,
ssh.*_file) cannot escape via .. traversal. Empty strings pass
— callers fall back to the documented default.
impl Config
Validate that a key-file path (signing_key, attest.*_key_path,
ssh.*_file) cannot escape via .. traversal. Empty strings pass
— callers fall back to the documented default.
Sourcepub fn object_sync_policy(&self) -> SyncPolicy
pub fn object_sync_policy(&self) -> SyncPolicy
Map durability.objects onto the object-store sync policy.
Unknown values fall back to the batched default rather than
erroring — config load must not brick the repo.