Skip to main content

CallerGitRepository

Struct CallerGitRepository 

Source
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

Source

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.

Source

pub fn root(&self) -> &Path

Exact canonical repository root retained by this reader.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for CallerGitRepository

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.