summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-05-25 09:03:54 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-05-25 11:51:10 +0200
commit8f1babf346e12279b3a52d24d047bf9bf4425e6e (patch)
treec4bd066b3a8b00d5944d065c3f289007b75e188f
parentfa25695b74fed1a5857e7f176ea43372256f9762 (diff)
Mark 'vcs_modification_markers' as deprecated
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/pretty_printer.rs8
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 263f1d9f..0b46bec2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,8 @@
## `bat` as a library
+- `PrettyPrinter::vcs_modification_markers` has been marked deprecated when building without the `git` feature, see #997 and #1020 (@eth-p, @sharkdp)
+
## Packaging
- Compilation problems with `onig_sys` on various platforms have been resolved by upgrading to `syntect 4.2`, which includes a new `onig` version that allows to build `onig_sys` without the `bindgen` dependency. This removes the need for `libclang(-dev)` to be installed to compile `bat`. Package maintainers might want to remove `clang` as a build dependency. See #650 for more details.
diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs
index 7ce7a70c..ccbe72dd 100644
--- a/src/pretty_printer.rs
+++ b/src/pretty_printer.rs
@@ -167,6 +167,14 @@ impl<'a> PrettyPrinter<'a> {
/// Whether to show modification markers for VCS changes. This has no effect if
/// the `git` feature is not activated.
+ #[cfg_attr(
+ not(feature = "git"),
+ deprecated(
+ note = "Using vcs_modification_markers without the 'git' feature has no effect. \
+ The function will be removed (for non-'git' use cases) in the future."
+ )
+ )]
+ #[allow(unused_variables)]
pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self {
#[cfg(feature = "git")]
{