]> git.ipfire.org Git - thirdparty/git.git/commit
merge-ort: convert more error() cases to path_msg()
authorElijah Newren <newren@gmail.com>
Wed, 19 Jun 2024 03:00:19 +0000 (03:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2024 17:35:25 +0000 (10:35 -0700)
commitf19b9165351a4058832bb43560178474c7501925
tree7df7a26f27743041626069f3a1f8c4db00d8d2d5
parent14949d91b60176fa01850c2a3454cd72eb9bc5d6
merge-ort: convert more error() cases to path_msg()

merge_submodule() stores errors using path_msg(), whereas other call
sites make use of the error() function.  This is inconsistent, and
moving towards path_msg() seems more friendly for libification efforts
since it will allow the caller to determine whether the error messages
need to be printed.

Note that this deferred handling of error messages changes the error
message in a recursive merge from
  error: failed to execute internal merge
to
  From inner merge:  error: failed to execute internal merge
which provides a little more information about the error which may be
useful.  Since the recursive merge strategy still only shows the older
error, we had to adjust the new testcase introduced a few commits ago to
just search for the older message somewhere in the output.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c
t/t6406-merge-attr.sh