Enum git_repository::discover::repository::Kind
source · pub enum Kind {
Bare,
WorkTree {
linked_git_dir: Option<PathBuf>,
},
WorkTreeGitDir {
work_dir: PathBuf,
},
Submodule {
git_dir: PathBuf,
},
SubmoduleGitDir,
}
Expand description
The kind of repository path.
Variants
Bare
A bare repository does not have a work tree, that is files on disk beyond the git
repository itself.
Note that this is merely a guess at this point as we didn’t read the configuration yet.
WorkTree
Fields
A git
repository along with a checked out files in a work tree.
WorkTreeGitDir
Fields
work_dir: PathBuf
Path to the worktree directory.
A worktree’s git directory in the common.git
directory in worktrees/<name>
.
Submodule
Fields
git_dir: PathBuf
The git repository itself that is referenced by the .git
dir file, typically in the .git/modules/**/<name>
directory of the parent
repository.
The directory is a .git
dir file of a submodule worktree.
SubmoduleGitDir
The git directory in the .git/modules/**/<name>
directory tree of the parent repository
Implementations
Trait Implementations
sourceimpl Ord for Kind
impl Ord for Kind
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
sourcefn partial_cmp(&self, other: &Kind) -> Option<Ordering>
fn partial_cmp(&self, other: &Kind) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more