diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-04-20 19:12:54 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-04-24 16:43:24 -0400 |
commit | 6630202259cf984a8b20d7cb76086986a107390c (patch) | |
tree | a33d182815ad51e675c130a9efebe0f7b4ad7b3f /src/config.rs | |
parent | a15b1221ba29ec062590069ea629a0464f81e0a6 (diff) |
Output paths relative to current working directory
Fixes #552
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index f822efc2..c6719839 100644 --- a/src/config.rs +++ b/src/config.rs @@ -23,6 +23,7 @@ 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 error_exit_code: i32, pub file_added_label: String, @@ -182,6 +183,7 @@ 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, error_exit_code: 2, // Use 2 for error because diff uses 0 and 1 for non-error. file_added_label, |