diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-12-20 10:14:54 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-12-20 10:14:55 -0800 |
| commit | 66e959f4316dcfd5eca8fcd3e0072415277753ea (patch) | |
| tree | e4fe76592881ba5c3a2f4d63b1de7b1fccb56d2c /diff.c | |
| parent | Merge branch 'jk/implicit-true' (diff) | |
| parent | sequencer: simplify away extra git_config_string() call (diff) | |
| download | git-66e959f4316dcfd5eca8fcd3e0072415277753ea.tar.gz git-66e959f4316dcfd5eca8fcd3e0072415277753ea.zip | |
Merge branch 'jk/config-cleanup'
Code clean-up around use of configuration variables.
* jk/config-cleanup:
sequencer: simplify away extra git_config_string() call
gpg-interface: drop pointless config_error_nonbool() checks
push: drop confusing configset/callback redundancy
config: use git_config_string() for core.checkRoundTripEncoding
diff: give more detailed messages for bogus diff.* config
config: use config_error_nonbool() instead of custom messages
imap-send: don't use git_die_config() inside callback
git_xmerge_config(): prefer error() to die()
config: reject bogus values for core.checkstat
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -445,9 +445,12 @@ int git_diff_ui_config(const char *var, const char *value, } if (!strcmp(var, "diff.algorithm")) { + if (!value) + return config_error_nonbool(var); diff_algorithm = parse_algorithm_value(value); if (diff_algorithm < 0) - return -1; + return error(_("unknown value for config '%s': %s"), + var, value); return 0; } @@ -486,7 +489,8 @@ int git_diff_basic_config(const char *var, const char *value, return config_error_nonbool(var); val = parse_ws_error_highlight(value); if (val < 0) - return -1; + return error(_("unknown value for config '%s': %s"), + var, value); ws_error_highlight_default = val; return 0; } |
