git_xmerge_config(): prefer error() to die()
commit22e27413eee9ff3bcbd3c7e8f3a8d1a40650e1b2
authorJeff King <peff@peff.net>
Thu, 7 Dec 2023 07:24:49 +0000 (7 02:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2023 23:26:21 +0000 (9 08:26 +0900)
tree9e644d6ecc2b296f47c27b8b08eee9f281811811
parent41f98fae0224c2d7043376a9c421b4e0e73cdd82
git_xmerge_config(): prefer error() to die()

When parsing merge config, a few code paths die on error. It's
preferable for us to call error() here, because the resulting error
message from the config parsing code contains much more detail.

For example, before:

  fatal: unknown style 'bogus' given for 'merge.conflictstyle'

and after:

  error: unknown style 'bogus' given for 'merge.conflictstyle'
  fatal: bad config variable 'merge.conflictstyle' in file '.git/config' at line 7

Since we're touching these lines, I also marked them for translation.
There's no reason they shouldn't behave like most other config-parsing
errors.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff-interface.c