Re: [PATCH 2/9] sparse-checkout: make --cone the default

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

 



On Tue, Mar 8, 2022 at 6:26 AM Derrick Stolee <derrickstolee@xxxxxxxxxx> wrote:
>
> On 3/8/2022 2:39 AM, Elijah Newren via GitGitGadget wrote:
> > From: Elijah Newren <newren@xxxxxxxxx>
> >
> > Make cone mode the default, and update the documentation accordingly.
>
> Doc changes look good.
>
> > --- a/builtin/sparse-checkout.c
> > +++ b/builtin/sparse-checkout.c
> > @@ -397,7 +397,7 @@ static int update_modes(int *cone_mode, int *sparse_index)
> >
> >       /* Set cone/non-cone mode appropriately */
> >       core_apply_sparse_checkout = 1;
> > -     if (*cone_mode == 1) {
> > +     if (*cone_mode == 1 || *cone_mode == -1) {
>
> Part of me likes the fact that you're pointing out "if it is
> enabled directly or not set at all", but maybe it would be
> best to do
>
>         if (*cone_mode) {
>
> What do you think?

How about if I switch it, but add a comment since the special "unset"
value of -1 may not be clear:

    if (*cone_mode) { /* also handles "not specified" (value of -1) */



[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]

  Powered by Linux