diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index f822efc2..fbad2e41 100644 --- a/src/config.rs +++ b/src/config.rs @@ -23,7 +23,9 @@ pub struct Config { pub background_color_extends_to_terminal_width: bool, pub commit_style: Style, pub color_only: bool, + pub cwd_relative_to_repo_root: Option<String>, pub decorations_width: cli::Width, + pub diff_stat_align_width: usize, pub error_exit_code: i32, pub file_added_label: String, pub file_copied_label: String, @@ -70,6 +72,7 @@ pub struct Config { pub plus_style: Style, pub git_minus_style: Style, pub git_plus_style: Style, + pub relative_paths: bool, pub show_themes: bool, pub side_by_side: bool, pub side_by_side_data: side_by_side::SideBySideData, @@ -182,7 +185,9 @@ impl From<cli::Opt> for Config { .background_color_extends_to_terminal_width, commit_style, color_only: opt.color_only, + cwd_relative_to_repo_root: std::env::var("GIT_PREFIX").ok(), decorations_width: opt.computed.decorations_width, + diff_stat_align_width: opt.diff_stat_align_width, error_exit_code: 2, // Use 2 for error because diff uses 0 and 1 for non-error. file_added_label, file_copied_label, @@ -235,6 +240,7 @@ impl From<cli::Opt> for Config { plus_style, git_minus_style, git_plus_style, + relative_paths: opt.relative_paths, show_themes: opt.show_themes, side_by_side: opt.side_by_side, side_by_side_data, |