Re: [PATCH 1/2] status: show 'revert' state and status hint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> 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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]