pub struct WorktreeGit {
pub dir: PathBuf,
pub admin: PathBuf,
pub branch: String,
}Expand description
The parts of the repository’s git directory that a commit in one linked worktree writes.
Fields§
§dir: PathBufThe repository’s git directory.
admin: PathBufThe worktree’s entry under dir/worktrees/: its HEAD, index and
HEAD reflog.
branch: StringThe branch checked out in it, e.g. agix/worktree-x.
Implementations§
Source§impl WorktreeGit
impl WorktreeGit
Sourcepub fn branch_ref(&self) -> PathBuf
pub fn branch_ref(&self) -> PathBuf
The loose ref of Self::branch. git rewrites it by renaming
<ref>.lock over it.
pub fn branch_ref_lock(&self) -> PathBuf
Sourcepub fn writable(&self) -> Vec<PathBuf>
pub fn writable(&self) -> Vec<PathBuf>
What a commit writes: the object store, the worktree’s entry, the
branch’s ref, its lock and its reflog. Nothing else in dir — not
the other refs, packed-refs, info/ or the main worktree’s files.
objects/info/ and the entry’s control files are held read-only on
top by the sandbox.
Trait Implementations§
Source§impl Clone for WorktreeGit
impl Clone for WorktreeGit
Source§impl Debug for WorktreeGit
impl Debug for WorktreeGit
impl Eq for WorktreeGit
Source§impl PartialEq for WorktreeGit
impl PartialEq for WorktreeGit
impl StructuralPartialEq for WorktreeGit
Auto Trait Implementations§
impl Forget for WorktreeGit
impl Freeze for WorktreeGit
impl Move for WorktreeGit
impl RefUnwindSafe for WorktreeGit
impl Send for WorktreeGit
impl Sync for WorktreeGit
impl Unpin for WorktreeGit
impl UnsafeUnpin for WorktreeGit
impl UnwindSafe for WorktreeGit
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