pub enum CommitScope {
AutoStage,
Staged,
Paths(ResolvedPathspecs),
Patch {
input: CommitPatchInput,
pathspecs: Vec<String>,
},
}Expand description
Which paths are included when recording a commit (commit_with_scope).
Variants§
AutoStage
Stage every worktree change, then commit (default grit commit behavior).
Staged
Commit the index as-is (git commit without -a).
Paths(ResolvedPathspecs)
Commit only matching paths from the worktree (git commit --only -- paths).
Patch
Commit only hunks from a unified diff or stable hunk ids (grit commit --hunks / --patch-file).
Fields
§
input: CommitPatchInputHunk ids or pre-parsed file patches (exactly one is populated).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommitScope
impl RefUnwindSafe for CommitScope
impl Send for CommitScope
impl Sync for CommitScope
impl Unpin for CommitScope
impl UnsafeUnpin for CommitScope
impl UnwindSafe for CommitScope
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