]> git.ipfire.org Git - thirdparty/git.git/commitdiff
branch.c: simplify advice-and-die sequence
authorGlen Choo <chooglen@google.com>
Thu, 31 Mar 2022 22:41:18 +0000 (15:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Mar 2022 22:52:53 +0000 (15:52 -0700)
In the dwim_branch_start(), when we cannot find an appropriate
upstream, we will die with the same message anyway, whether we
issue an advice message.

Flip the code around a bit and simplify the flow using
advise_if_enabled() function.

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

No differences found