Enum gix_attributes::Source
source · pub enum Source {
GitInstallation,
System,
Git,
Local,
}
Expand description
A list of known global sources for git attribute files in order of ascending precedence.
This means that values from the first variant will be returned first.
Variants§
GitInstallation
The attribute file that the installation itself ships with.
System
System-wide attributes file. This is typically defined as
$(prefix)/etc/gitattributes
(where prefix is the git-installation directory).
Git
This is <xdg-config-home>/git/attributes
and is git application configuration per user.
Note that there is no ~/.gitattributes
file.
Local
The configuration of the repository itself, located in $GIT_DIR/info/attributes
.
Implementations§
source§impl Source
impl Source
sourcepub fn storage_location(
self,
env_var: &mut dyn FnMut(&str) -> Option<OsString>
) -> Option<Cow<'static, Path>>
pub fn storage_location( self, env_var: &mut dyn FnMut(&str) -> Option<OsString> ) -> Option<Cow<'static, Path>>
Produce a storage location for the this source while potentially querying environment variables using env_var(<name>)
,
or None
if the storage location could not be obtained.
Note that local sources are returned as relative paths to be joined with the base in a separate step.
Trait Implementations§
source§impl Ord for Source
impl Ord for Source
source§impl PartialEq for Source
impl PartialEq for Source
source§impl PartialOrd for Source
impl PartialOrd for Source
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more