1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-20 12:12:31 +01:00

Allow application to be built without git support

Caveats:
The help descriptions aren't changed with you remove the "git" feature.
This commit is contained in:
Ethan P
2020-05-12 22:24:51 -07:00
parent 0aca8cab0b
commit 887e61a99d
5 changed files with 75 additions and 60 deletions

View File

@@ -270,6 +270,7 @@ impl<'a> PrettyPrinter<'a> {
style_components.push(StyleComponent::Snip);
}
if self.active_style_components.vcs_modification_markers {
#[cfg(feature = "git")]
style_components.push(StyleComponent::Changes);
}
self.config.style_components = StyleComponents::new(&style_components);