pub struct CallerGitRepository { /* private fields */ }Expand description
One retained, offline-only reader for a caller checkout.
Construction resolves the fixed platform Git without PATH, creates private process state,
rejects local include/worktree/external-filter policy by key name, and binds one canonical
repository root. Every exposed operation is fixed read-only plumbing; callers cannot supply a
subcommand, network capability, environment override, or output path.
Implementations§
Source§impl CallerGitRepository
impl CallerGitRepository
Sourcepub fn open(start: impl AsRef<Path>) -> Result<Self, GitPublisherConfigError>
pub fn open(start: impl AsRef<Path>) -> Result<Self, GitPublisherConfigError>
Bind a caller checkout to the fixed platform Git and a config-neutral private process.
§Errors
Rejects unsupported platforms, unsafe paths, missing repositories, executable local Git policy, malformed output, and any failure to establish the retained standard toolchain.
Sourcepub fn head_revision(&self) -> Result<CallerGitOutput, GitExecutionError>
pub fn head_revision(&self) -> Result<CallerGitOutput, GitExecutionError>
Read the exact, replacement-disabled HEAD object name.
§Errors
Returns a redacted process-policy, timeout, output-limit, or Git failure.
Sourcepub fn working_tree_status(&self) -> Result<CallerGitOutput, GitExecutionError>
pub fn working_tree_status(&self) -> Result<CallerGitOutput, GitExecutionError>
Inspect tracked and untracked changes without refreshing or writing the caller index.
§Errors
Returns a redacted process-policy, timeout, output-limit, or Git failure.
Sourcepub fn tree_entries(
&self,
revision: &str,
paths: &[String],
) -> Result<CallerGitOutput, GitExecutionError>
pub fn tree_entries( &self, revision: &str, paths: &[String], ) -> Result<CallerGitOutput, GitExecutionError>
Read exact tree metadata for bounded literal repository-relative paths.
§Errors
Rejects invalid revisions/paths and returns redacted bounded Git execution failures.
Sourcepub fn blob_batch(
&self,
object_ids: &[u8],
output_limit: usize,
) -> Result<CallerGitOutput, GitExecutionError>
pub fn blob_batch( &self, object_ids: &[u8], output_limit: usize, ) -> Result<CallerGitOutput, GitExecutionError>
Read a bounded batch of exact object IDs through cat-file --batch.
§Errors
Rejects malformed input/output bounds and returns redacted bounded Git failures.
Sourcepub fn current_branch(&self) -> Result<CallerGitOutput, GitExecutionError>
pub fn current_branch(&self) -> Result<CallerGitOutput, GitExecutionError>
Read the current symbolic branch without invoking aliases or external helpers.
§Errors
Returns a redacted process-policy, timeout, output-limit, or Git failure.
Sourcepub fn check_ignore(
&self,
path: &str,
) -> Result<CallerGitOutput, GitExecutionError>
pub fn check_ignore( &self, path: &str, ) -> Result<CallerGitOutput, GitExecutionError>
Check one exact repository-relative path against repository ignore rules.
§Errors
Rejects unsafe paths and returns redacted bounded Git execution failures.
Sourcepub fn discover_remote(
&self,
remote_name: &str,
) -> Result<GithubRemoteSnapshot, GitPublisherConfigError>
pub fn discover_remote( &self, remote_name: &str, ) -> Result<GithubRemoteSnapshot, GitPublisherConfigError>
Capture one local remote URL/push URL without includes or rewrite evaluation.
§Errors
Rejects invalid names, malformed/duplicate endpoints, and redacted Git failures.