summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-06-19 15:10:47 -0400
committerDan Davison <dandavison7@gmail.com>2020-06-19 15:33:41 -0400
commit574e5d2ea05940e56364aadcf8b5b5f0344bd01c (patch)
tree6699405ee00b34596d33f5715e8cd1667c931d65
parent9c2743eb5a61190d559247a649652acde407f54c (diff)
Hack: allow file-modified-label to be overridden in gitconfig
-rw-r--r--src/rewrite_options.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rewrite_options.rs b/src/rewrite_options.rs
index c1fb8024..50950eb5 100644
--- a/src/rewrite_options.rs
+++ b/src/rewrite_options.rs
@@ -35,7 +35,11 @@ fn rewrite_options_to_implement_color_only(opt: &mut cli::Opt) {
/// Implement --navigate
fn rewrite_options_to_implement_navigate(opt: &mut cli::Opt, arg_matches: &clap::ArgMatches) {
if opt.navigate {
- if !user_supplied_option("file-modified-label", arg_matches) {
+ // Hack: perhaps navigate should be a built-in preset
+ let default_value = "";
+ if !user_supplied_option("file-modified-label", arg_matches)
+ && opt.file_modified_label == default_value
+ {
opt.file_modified_label = "Δ".to_string();
}
}