Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Mar 4, 2016, 06:51 UTC
- Message-ID
- <vpqpovag2gz.fsf@anie.imag.fr>
- In-Reply-To
- <CA+DCAeSRN=nqhnv14kvbnxExiSBPnA3hLP8hY0fbd+YgTR3TNw@mail.gmail.com>
Mehul Jain <mehul.jain2029@gmail.com> writes:
Show 12 quoted lines
> On Thu, Mar 3, 2016 at 10:54 PM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> Mehul Jain <mehul.jain2029@gmail.com> writes:
>>> + else {
>>> + /* If --[no-]autostash option is called without --rebase */
>>> + if (opt_autostash == 0)
>>> + die(_("--no-autostash option is only valid with --rebase."));
>>> + else if (opt_autostash == 1)
>>
>> The else is not needed since the other branch dies.
>
> I'm bit confused here. Which "else" you are talking about.The last "else" keyword. Not the "else" branch. It would just work like this, and be a bit more pleasing to my eyes:
if (...) die(...); if (...) die(...);
-- Matthieu Moy http://www-verimag.imag.fr/~moy/