On Fri, Mar 11, 2016 at 7:00 PM, Matthieu Moy
<matthieu....@grenoble-inp.fr> wrote:
> What Junio says is that you don't need to write
>
> static int config_autostash = 0;
>
> since it is equivalent to
>
> static int config_autostash;
>
> But there's nothing wrong with having a static variable defaulting to 0.

My bad. I should have read Junio's comment more carefully.

config_autostash can be default to 0. And thus
             if (opt_autostash != 1)
                    die_on_unclean_work_tree(prefix);

can be replaced by
           if (!opt_autostash)
                    die_on_unclean_work_tree(prefix);

and thus opt_autostash will be either 0 or 1 and we don't
have to worry about it being -1 (whenever --rebase is passed).

I will make the changes accordingly.

Thanks,
Mehul
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to