Struct git_repository::worktree::fs::Capabilities
source · pub struct Capabilities {
pub precompose_unicode: bool,
pub ignore_case: bool,
pub executable_bit: bool,
pub symlink: bool,
}
Expand description
Common knowledge about the worktree that is needed across most interactions with the work tree
Fields
precompose_unicode: bool
If true, the filesystem will store paths as decomposed unicode, i.e. ä
becomes "a\u{308}"
, which means that
we have to turn these forms back from decomposed to precomposed unicode before storing it in the index or generally
using it. This also applies to input received from the command-line, so callers may have to be aware of this and
perform conversions accordingly.
If false, no conversions will be performed.
ignore_case: bool
If true, the filesystem ignores the case of input, which makes A
the same file as a
.
This is also called case-folding.
executable_bit: bool
If true, we assume the the executable bit is honored as part of the files mode. If false, we assume the file system ignores the executable bit, hence it will be reported as ‘off’ even though we just tried to set it to be on.
symlink: bool
If true, the file system supports symbolic links and we should try to create them. Otherwise symbolic links will be checked out as files which contain the link as text.
Implementations
sourceimpl Capabilities
impl Capabilities
sourcepub fn probe(git_dir: impl AsRef<Path>) -> Capabilities
pub fn probe(git_dir: impl AsRef<Path>) -> Capabilities
try to determine all values in this context by probing them in the given git_dir
, which
should be on the file system the git repository is located on.
git_dir
is a typical git repository, expected to be populated with the typical files like config
.
All errors are ignored and interpreted on top of the default for the platform the binary is compiled for.
Trait Implementations
sourceimpl Clone for Capabilities
impl Clone for Capabilities
sourcefn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for Capabilities
impl Debug for Capabilities
sourceimpl Default for Capabilities
Available on Unix and non-macOS only.
impl Default for Capabilities
sourcefn default() -> Capabilities
fn default() -> Capabilities
sourceimpl Hash for Capabilities
impl Hash for Capabilities
sourceimpl Ord for Capabilities
impl Ord for Capabilities
sourcefn cmp(&self, other: &Capabilities) -> Ordering
fn cmp(&self, other: &Capabilities) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
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>,
sourceimpl PartialEq<Capabilities> for Capabilities
impl PartialEq<Capabilities> for Capabilities
sourcefn eq(&self, other: &Capabilities) -> bool
fn eq(&self, other: &Capabilities) -> bool
sourceimpl PartialOrd<Capabilities> for Capabilities
impl PartialOrd<Capabilities> for Capabilities
sourcefn partial_cmp(&self, other: &Capabilities) -> Option<Ordering>
fn partial_cmp(&self, other: &Capabilities) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more