summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-12-19 12:36:07 +0000
committerDan Davison <dandavison7@gmail.com>2020-12-19 12:48:25 +0000
commit334dec742d78d6d72715eaefaaa1c8313c6315fb (patch)
tree19261671671f088921e5396dcdedd2d8149287bc /src/config.rs
parent3c31223dbfcbcb32c3c2da990091cc65e9f6eca1 (diff)
Implement hunk-header-style 'file' attribute
Fixes #309
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 28e571d6..6d47ac59 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -32,6 +32,7 @@ pub struct Config {
pub file_style: Style,
pub git_config_entries: HashMap<String, GitConfigEntry>,
pub hunk_header_style: Style,
+ pub hunk_header_style_include_file_path: bool,
pub hyperlinks: bool,
pub hyperlinks_file_link_format: String,
pub inspect_raw_lines: cli::InspectRawLines,
@@ -163,6 +164,10 @@ impl From<cli::Opt> for Config {
file_style,
git_config_entries: opt.git_config_entries,
hunk_header_style,
+ hunk_header_style_include_file_path: opt
+ .hunk_header_style
+ .split(' ')
+ .any(|s| s == "file"),
hyperlinks: opt.hyperlinks,
hyperlinks_file_link_format: opt.hyperlinks_file_link_format,
inspect_raw_lines: opt.computed.inspect_raw_lines,