pub struct Repo {
pub common: PathBuf,
}Expand description
The git dirs of one repository: the common dir, then each linked worktree’s private one.
Fields§
§common: PathBufImplementations§
Source§impl Repo
impl Repo
Sourcepub fn locate(start: &Path) -> Option<Repo>
pub fn locate(start: &Path) -> Option<Repo>
The repository start stands in, found from the filesystem alone:
$GIT_DIR when set, else the nearest .git above start (a folder,
or a gitdir: file), its commondir followed. No process is spawned:
this runs before every command.
Sourcepub fn locate_with(start: &Path, git_dir: Option<OsString>) -> Option<Repo>
pub fn locate_with(start: &Path, git_dir: Option<OsString>) -> Option<Repo>
As Repo::locate, with $GIT_DIR given rather than read.
Sourcepub fn worktrees(&self) -> Vec<PathBuf>
pub fn worktrees(&self) -> Vec<PathBuf>
Each linked worktree’s private git dir, listed when asked: the hot path checks the done-marker first and never lists them.
Trait Implementations§
impl Eq for Repo
impl StructuralPartialEq for Repo
Auto Trait Implementations§
impl Forget for Repo
impl Freeze for Repo
impl Move for Repo
impl RefUnwindSafe for Repo
impl Send for Repo
impl Sync for Repo
impl Unpin for Repo
impl UnsafeUnpin for Repo
impl UnwindSafe for Repo
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