branch --set-upstream-to: be consistent when advising
commitac59c742de5f548ed07735fb212cc87129383bcd
authorGlen Choo <chooglen@google.com>
Tue, 29 Mar 2022 20:01:18 +0000 (29 20:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Mar 2022 21:15:54 +0000 (30 14:15 -0700)
tree9f6f659402251ec99493b72d06b0ca556a28a819
parentcfbda6ba6b33e903df58f96fdb2ee9314097ff2f
branch --set-upstream-to: be consistent when advising

"git branch --set-upstream-to" behaves differently when advice is
enabled/disabled:

|                 | error prefix | exit code |
|-----------------+--------------+-----------|
| advice enabled  | error:       |         1 |
| advice disabled | fatal:       |       128 |

Make both cases consistent by using die_message() when advice is
enabled (this was first proposed in [1]).

[1] https://lore.kernel.org/git/211210.86ee6ldwlc.gmgdl@evledraar.gmail.com

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
branch.c