pub struct PreparingRecord {Show 16 fields
pub transaction_id: String,
pub mode: TransactionMode,
pub base: Base,
pub symbolic_head: SymbolicHead,
pub target_ref: String,
pub conclusion: Conclusion,
pub repository_root: String,
pub git_dir: String,
pub common_dir: String,
pub real_index_path: String,
pub object_directory: String,
pub ref_format: RefFormat,
pub empty_tree_oid: String,
pub shadow_path: String,
pub selected_pathspecs: Vec<String>,
pub invoked_at: String,
}Expand description
What:
preparing.json:
invocation capture facts written before any Git mutation.
Why:
Recovery learns from it where every piece of the transaction lives.
In TS you’d write (pseudocode):
type PreparingRecord = { schemaVersion: 2; state: 'preparing'; transactionId; mode; base; ... };Fields§
§transaction_id: StringTransaction ID, also the reflog nonce.
mode: TransactionModeCommit selection mode.
base: BaseTarget commit at invocation.
symbolic_head: SymbolicHeadSymbolic HEAD target at invocation.
target_ref: StringRef advanced by compare-and-swap.
conclusion: ConclusionCommit kind.
repository_root: StringCanonical worktree root.
git_dir: StringOwning worktree Git directory.
common_dir: StringCommon Git directory.
real_index_path: StringReal index path.
object_directory: StringReal object directory.
ref_format: RefFormatRef storage backend.
empty_tree_oid: StringEmpty tree standing in for an unborn base.
shadow_path: StringShadow repository path derived from the transaction ID.
selected_pathspecs: Vec<String>Pathspecs selected at invocation.
invoked_at: StringISO-8601 invocation start time.
Trait Implementations§
Source§impl Clone for PreparingRecord
impl Clone for PreparingRecord
Source§impl Debug for PreparingRecord
impl Debug for PreparingRecord
impl Eq for PreparingRecord
Source§impl PartialEq for PreparingRecord
impl PartialEq for PreparingRecord
impl StructuralPartialEq for PreparingRecord
Auto Trait Implementations§
impl Freeze for PreparingRecord
impl RefUnwindSafe for PreparingRecord
impl Send for PreparingRecord
impl Sync for PreparingRecord
impl Unpin for PreparingRecord
impl UnsafeUnpin for PreparingRecord
impl UnwindSafe for PreparingRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more