From: Matthieu Moy Date: Tue, 02 Apr 2013 20:36:20 GMT Subject: Re: [PATCH 1/2] status: show 'revert' state and status hint Message-ID: In-Reply-To: <7vobdwbs86.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: >> + 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/