#[non_exhaustive]pub enum WorktreeBaseRef {
Head,
Fresh,
}Expand description
Base commit strategy for worktree branches.
Determines where the new branch for an agent’s worktree is forked from.
§Examples
use zeph_config::WorktreeBaseRef;
// Default is Head — no network access needed.
let base = WorktreeBaseRef::default();
assert!(matches!(base, WorktreeBaseRef::Head));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Head
Branch from the local HEAD commit. No network access required.
Fresh
Fetch origin/<default_branch> and branch from that commit.
Ensures the agent starts from the latest remote state, at the cost of
a git fetch on every spawn.
Trait Implementations§
Source§impl Clone for WorktreeBaseRef
impl Clone for WorktreeBaseRef
Source§fn clone(&self) -> WorktreeBaseRef
fn clone(&self) -> WorktreeBaseRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorktreeBaseRef
impl Debug for WorktreeBaseRef
Source§impl Default for WorktreeBaseRef
impl Default for WorktreeBaseRef
Source§fn default() -> WorktreeBaseRef
fn default() -> WorktreeBaseRef
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorktreeBaseRef
impl<'de> Deserialize<'de> for WorktreeBaseRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorktreeBaseRef
impl RefUnwindSafe for WorktreeBaseRef
impl Send for WorktreeBaseRef
impl Sync for WorktreeBaseRef
impl Unpin for WorktreeBaseRef
impl UnsafeUnpin for WorktreeBaseRef
impl UnwindSafe for WorktreeBaseRef
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