show-ref: use die_for_incompatible_opt3()
commit7382497372f065fefe737333980a8146ede2955c
authorRené Scharfe <l.s.r@web.de>
Mon, 11 Dec 2023 08:09:28 +0000 (11 09:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Dec 2023 15:17:27 +0000 (11 07:17 -0800)
tree737257cb41c6b6931e0b0d79dca7c230239e9774
parent564d0252ca632e0264ed670534a51d18a689ef5d
show-ref: use die_for_incompatible_opt3()

Use the standard message for reporting the use of multiple mutually
exclusive options by calling die_for_incompatible_opt3() instead of
rolling our own.  This has the benefits of showing only the actually
given options, reducing the number of strings to translate and making
the UI slightly more consistent.

Adjust the test to no longer insist on a specific order of the
reported options, as this implementation detail does not affect the
usefulness of the error message.

Reported-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/show-ref.c
t/t1403-show-ref.sh