Re: [PATCH 1/2] status: show 'revert' state and status hint
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Apr 2, 2013, 20:36 UTC
- Message-ID
- <vpqr4isd60r.fsf@grenoble-inp.fr>
- In-Reply-To
- <7vobdwbs86.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
>> + if (advice_status_hints) {
>> + }
>> + if (advice_status_hints)
>> + status_printf_ln(s, color,
>> + _(" (use \"git revert --abort\" to cancel the revert operation)"));
>
> Why not a single conditional? i.e.
>
> if (advice_status_hints) {
> if unmerged
> fix and continue
> else
> say continue
> you can also say abort
> }Oops, you're right. I wrote the code mostly with cut-and-past + edit from other functions, and didn't notice the obvious refactoring opportunity.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/