Skip to main content

Crate sley_core

Crate sley_core 

Source

Modules§

trace2
Minimal trace2 event-target support (GIT_TRACE2_EVENT).

Structs§

BString
A byte string for git paths and similar on-disk identifiers.
ByteString
Capability
FullName
A validated git ref name (e.g. refs/heads/main, HEAD).
GitTime
A git timestamp: a Unix time plus the committer’s timezone offset.
IdentFields
A tolerant parse-view of a git identity line split git’s way (ident.c’s split_ident_line). Unlike Signature::from_ident_line — which is a strict, byte-exact round-trip parser — this mirrors how git’s pretty-printer recovers fields from broken idents: the email is the run between the first < and the first following >, while the timestamp is located by scanning backwards from the end of the line for the last >. That split lets a corrupt ident like Name <a@b>-<> 123 +0000 still surrender the correct name (Name), email (a@b), and date (123 +0000).
ObjectId
RepoPath
Signature
A typed parse-view of a git identity line (Name <email> <secs> <tz>) as found on a commit’s author/committer or a tag’s tagger header.
StreamingDigest

Enums§

CliExit
Git-compatible CLI exit status. See git help exit-code for the upstream taxonomy.
DateMode
GitError
MissingObjectContext
MissingObjectKind
NotFoundKind
ObjectFormat

Constants§

UPSTREAM_GIT_COMPAT_VERSION

Functions§

cli_exit_code
Map a GitError to the process exit code the CLI should use.
digest_bytes
ident_render_date
Render an ident’s date the way pretty.c’s show_ident_date does: parse the timestamp (git’s parse_timestamp is unsigned/base-10 and clamps on overflow), substitute the epoch sentinel (time = 0, timezone +0000) when the value overflows what a time_t can hold, then format per mode. date is the timestamp digit-run and tz its timezone token (as returned by split_ident_line).
object_id_for_bytes
original_cwd
set_original_cwd
split_ident_line
Split a git identity line the way ident.c’s split_ident_line does, returning None only when the line has no < or no following > (git’s status < 0). The date/timezone fields are None for the “person only” case where no valid timestamp follows the final >.
to_hex

Type Aliases§

Result