Skip to content

Commit

Permalink
Delete unused blame CLI
Browse files Browse the repository at this point in the history
This should have been done in 0745f85
and the command line options were therefore incorrectly released in
0.9.0.
  • Loading branch information
dandavison committed Oct 27, 2021
1 parent 7a3527c commit 3aab5d1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 37 deletions.
21 changes: 0 additions & 21 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,27 +420,6 @@ pub struct Opt {
/// (underline), 'ol' (overline), or the combination 'ul ol'.
pub hunk_header_decoration_style: String,

/// Format string for git blame commit metadata. Available placeholders are
/// "{timestamp}", "{author}", and "{commit}".
#[structopt(
long = "blame-format",
default_value = "{timestamp:<15} {author:<15} {commit:<8} │ "
)]
pub blame_format: String,

/// Background colors used for git blame lines (space-separated string).
/// Lines added by the same commit are painted with the same color; colors
/// are recycled as needed.
#[structopt(long = "blame-palette", default_value = "#FFFFFF #DDDDDD #BBBBBB")]
pub blame_palette: String,

/// Format of `git blame` timestamp in raw git output received by delta.
#[structopt(
long = "blame-timestamp-format",
default_value = "%Y-%m-%d %H:%M:%S %z"
)]
pub blame_timestamp_format: String,

/// Default language used for syntax highlighting when this cannot be
/// inferred from a filename. It will typically make sense to set this in
/// per-repository git config (.git/config)
Expand Down
10 changes: 0 additions & 10 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ fn adapt_wrap_max_lines_argument(arg: String) -> usize {
pub struct Config {
pub available_terminal_width: usize,
pub background_color_extends_to_terminal_width: bool,
pub blame_format: String,
pub blame_palette: Vec<String>,
pub blame_timestamp_format: String,
pub commit_style: Style,
pub color_only: bool,
pub commit_regex: Regex,
Expand Down Expand Up @@ -260,13 +257,6 @@ impl From<cli::Opt> for Config {
background_color_extends_to_terminal_width: opt
.computed
.background_color_extends_to_terminal_width,
blame_format: opt.blame_format,
blame_palette: opt
.blame_palette
.split_whitespace()
.map(|s| s.to_owned())
.collect::<Vec<String>>(),
blame_timestamp_format: opt.blame_timestamp_format,
commit_style,
color_only: opt.color_only,
commit_regex,
Expand Down
3 changes: 0 additions & 3 deletions src/delta.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::borrow::Cow;
use std::collections::HashMap;
use std::io::BufRead;
use std::io::Write;

Expand Down Expand Up @@ -68,7 +67,6 @@ pub struct StateMachine<'a> {
// avoid emitting the file meta header line twice (#245).
pub current_file_pair: Option<(String, String)>,
pub handled_file_meta_header_line_file_pair: Option<(String, String)>,
pub blame_commit_colors: HashMap<String, String>,
}

pub fn delta<I>(lines: ByteLines<I>, writer: &mut dyn Write, config: &Config) -> std::io::Result<()>
Expand All @@ -94,7 +92,6 @@ impl<'a> StateMachine<'a> {
handled_file_meta_header_line_file_pair: None,
painter: Painter::new(writer, config),
config,
blame_commit_colors: HashMap::new(),
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/options/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ pub fn set_options(

set_options!(
[
blame_format,
blame_palette,
blame_timestamp_format,
color_only,
commit_decoration_style,
commit_regex,
Expand Down

0 comments on commit 3aab5d1

Please sign in to comment.