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 /xdiff-interface.c | |
| parent | 2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94 (diff) | |
| parent | ea8f9494aba052fd531f674f78dba55f084bdc34 (diff) | |
| download | git-66e959f4316dcfd5eca8fcd3e0072415277753ea.tar.gz | |
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 'xdiff-interface.c')
| -rw-r--r-- | xdiff-interface.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c index adcea109fa..d788689d01 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -1,4 +1,5 @@ #include "git-compat-util.h" +#include "gettext.h" #include "config.h" #include "hex.h" #include "object-store-ll.h" @@ -313,7 +314,7 @@ int git_xmerge_config(const char *var, const char *value, { if (!strcmp(var, "merge.conflictstyle")) { if (!value) - die("'%s' is not a boolean", var); + return config_error_nonbool(var); if (!strcmp(value, "diff3")) git_xmerge_style = XDL_MERGE_DIFF3; else if (!strcmp(value, "zdiff3")) @@ -325,8 +326,8 @@ int git_xmerge_config(const char *var, const char *value, * git-completion.bash when you add new merge config */ else - die("unknown style '%s' given for '%s'", - value, var); + return error(_("unknown style '%s' given for '%s'"), + value, var); return 0; } return git_default_config(var, value, ctx, cb); |
