mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
fix: gate Changes component on git feature flag
When bat is built without the `git` feature, `StyleComponent::Changes` is not available. Add `#[cfg(feature = "git")]` guard so `--diff --plain` works in both configurations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
169dc7c45b
commit
e60875ac12
1 file changed
+1
@@ -596,6 +596,7 @@ impl App {
|
||||
if self.matches.try_contains_id("diff").unwrap_or_default()
|
||||
&& self.matches.get_flag("diff")
|
||||
{
|
||||
#[cfg(feature = "git")]
|
||||
components.insert(StyleComponent::Changes);
|
||||
components.insert(StyleComponent::Snip);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user