summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-12-07 02:24:58 -0500
committerJunio C Hamano <gitster@pobox.com>2023-12-09 08:26:21 +0900
commit0dda4ce9f697a9ddfc1b2a3825dc07827a99d942 (patch)
tree01e79c185b209abbae35336c8a18cbd74ab7a899 /diff.c
parent22e27413eee9ff3bcbd3c7e8f3a8d1a40650e1b2 (diff)
imap-send: don't use git_die_config() inside callback
The point of git_die_config() is to let configset users mention the file/line info for invalid config, like: if (!git_config_get_int("foo.bar", &value)) { if (!is_ok(value)) git_die_config("foo.bar"); } Using it from within a config callback is unnecessary, because we can simply return an error, at which point the config machinery will mention the file/line of the offending variable. Worse, using git_die_config() can actually produce the wrong location when the key is found in multiple spots. For instance, with config like: [imap] host host = foo we'll report the line number of the "host = foo" line, but the problem is on the implicit-bool "host" line. We can fix it by just returning an error code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions