]> git.99rst.org Git - git.git/commit
branch.c: simplify advice-and-die sequence
authorGlen Choo <redacted>
Thu, 31 Mar 2022 22:41:18 +0000 (15:41 -0700)
committerJunio C Hamano <redacted>
Thu, 31 Mar 2022 22:52:53 +0000 (15:52 -0700)
commit6696601241d27cf7b2834b92788a73a6f4af2e89
treeef2796cf3403177fcff75b69732228562255789a
parent1f888282e2914283890f61000a7589d32b4132bc
branch.c: simplify advice-and-die sequence

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 <redacted>
Signed-off-by: Glen Choo <redacted>
Signed-off-by: Junio C Hamano <redacted>
branch.c
git clone https://git.99rst.org/PROJECT