Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 4, 2016, 01:01 UTC
- Message-ID
- <CAPig+cTC-fkJS5Lskww+qRW5XEqFK4f6fBbY6MBqJWKv5UN_ug@mail.gmail.com>
- In-Reply-To
- <vpqd1rbiifi.fsf@anie.imag.fr>
On Thu, Mar 3, 2016 at 12:24 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 8 quoted lines
> 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.A couple other minor comments (to be considered or ignored):
The comment "/* If --[no-]autostash ... */" merely repeats what the code itself already says, thus is not really helpful and can be dropped.
It would be reasonable to combine the two cases into one:
if (opt_autostash != -1)
die(_("--[no]-autostash option is only valid with --rebase."));