mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-09-28 05:09:01 +00:00
a740512014
The flags --git and --git-ignore are caught early during options parsing, so no more checking for git feature is done elsewhere. Since --git-ignore depends on git too since recently, remove it from help when git feature is disabled. Extended attributes now don’t artificially depends on git feature being enabled.
34 lines
637 B
Rust
34 lines
637 B
Rust
pub mod xattr;
|
|
|
|
#[cfg(feature = "git")]
|
|
pub mod git;
|
|
|
|
#[cfg(not(feature = "git"))]
|
|
pub mod git {
|
|
use std::iter::FromIterator;
|
|
use std::path::{Path, PathBuf};
|
|
|
|
use crate::fs::fields as f;
|
|
|
|
|
|
pub struct GitCache;
|
|
|
|
impl FromIterator<PathBuf> for GitCache {
|
|
fn from_iter<I>(_iter: I) -> Self
|
|
where I: IntoIterator<Item=PathBuf>
|
|
{
|
|
Self
|
|
}
|
|
}
|
|
|
|
impl GitCache {
|
|
pub fn has_anything_for(&self, _index: &Path) -> bool {
|
|
false
|
|
}
|
|
|
|
pub fn get(&self, _index: &Path, _prefix_lookup: bool) -> f::Git {
|
|
unreachable!();
|
|
}
|
|
}
|
|
}
|