summaryrefslogtreecommitdiffstats
path: root/src/search/entry
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-11-29 00:54:16 -0600
committerToby Vincent <tobyv13@gmail.com>2022-11-29 00:54:16 -0600
commitb32d10b65ee7bdd939915f2a34929386ac4595ea (patch)
tree30880943d5cfe696a71a09fd8994dd61768e56ee /src/search/entry
parent09f51336df00b38928c4b42782687012b9bfae39 (diff)
feat: add git feature git related config and cli flags
Diffstat (limited to 'src/search/entry')
-rw-r--r--src/search/entry/config.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/search/entry/config.rs b/src/search/entry/config.rs
index 24c7971..4372356 100644
--- a/src/search/entry/config.rs
+++ b/src/search/entry/config.rs
@@ -7,8 +7,10 @@ pub struct Config {
pub path_buf: PathBuf,
pub hidden: bool,
pub max_depth: Option<usize>,
- pub git: bool,
pub pattern: Option<String>,
+
+ #[cfg(feature = "git")]
+ pub git: bool,
}
impl From<PathBuf> for Config {
@@ -51,8 +53,10 @@ impl<'de> Deserialize<'de> for Config {
path_buf: PathBuf,
hidden: bool,
max_depth: Option<usize>,
- git: bool,
pattern: Option<String>,
+
+ #[cfg(feature = "git")]
+ git: bool,
},
}
@@ -62,14 +66,18 @@ impl<'de> Deserialize<'de> for Config {
path_buf,
hidden,
max_depth,
- git,
pattern,
+
+ #[cfg(feature = "git")]
+ git,
} => Ok(Self {
path_buf,
hidden,
max_depth,
- git,
pattern,
+
+ #[cfg(feature = "git")]
+ git,
}),
}
}