pub struct WorktreeConfig {
pub base_dir: String,
pub inherit_paths: Vec<String>,
}Fields§
§base_dir: StringWhere torii worktree add puts new worktrees when no path is given.
Default is .. (sibling directories of the main repo). Examples:
“..” → ../~ expansion is honoured. The <repo>-<branch> suffix is appended
automatically (branch slashes replaced with -).
inherit_paths: Vec<String>Paths from the main repo to also drop into every freshly-created
worktree. Typical entries: .env, target/, node_modules/, build
caches that aren’t tracked by git but you don’t want to regenerate
from scratch in every linked working copy.
Each entry is resolved relative to the main repo’s working directory. Heuristic per entry:
- directory present → symlink into the new worktree
- file present → copy into the new worktree
- missing → silently skipped
Default is empty (no inheritance, vanilla git worktree behaviour).
Trait Implementations§
Source§impl Clone for WorktreeConfig
impl Clone for WorktreeConfig
Source§fn clone(&self) -> WorktreeConfig
fn clone(&self) -> WorktreeConfig
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 WorktreeConfig
impl Debug for WorktreeConfig
Source§impl Default for WorktreeConfig
impl Default for WorktreeConfig
Source§impl<'de> Deserialize<'de> for WorktreeConfig
impl<'de> Deserialize<'de> for WorktreeConfig
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 WorktreeConfig
impl RefUnwindSafe for WorktreeConfig
impl Send for WorktreeConfig
impl Sync for WorktreeConfig
impl Unpin for WorktreeConfig
impl UnsafeUnpin for WorktreeConfig
impl UnwindSafe for WorktreeConfig
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