Skip to content

Commit

Permalink
Mark 'vcs_modification_markers' as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed May 25, 2020
1 parent fa25695 commit 8f1babf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions src/pretty_printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
{
Expand Down

0 comments on commit 8f1babf

Please sign in to comment.