Re: [PATCH 1/2] restore: require --source when combining --worktree and --staged

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

 



On Fri, May 1, 2020 at 4:28 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> @@ -1604,6 +1604,9 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
>         }
>         if (opts->checkout_index < 0 || opts->checkout_worktree < 0)
>                 BUG("these flags should be non-negative by now");
> +       if (opts->checkout_index > 0 && opts->checkout_worktree > 0 &&
> +           !opts->from_treeish)

If I re-roll the series for some reason, I'll drop the unnecessary ">
0". (But this code goes away in patch 2/2 anyhow, so I'm not too
worried about it.)



[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