Re: [PATCH v1 06/11] restore: add --worktree and --index
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 10, 2019, 20:03 UTC
- Message-ID
- <CAPig+cQ8YqAJ=3T++FCpew1SAUnwPYzZ3wRwExGu8Ed97ELrnw@mail.gmail.com>
- In-Reply-To
- <CABPp-BFv-a3Uw1g+ebLqTHRbCedsv1akZxxJ7QfeyXtXBdQuOw@mail.gmail.com>
On Sat, Mar 9, 2019 at 1:52 PM Elijah Newren <newren@gmail.com> wrote:
Show 6 quoted lines
> On Fri, Mar 8, 2019 at 2:17 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> > + if (!opts->checkout_worktree && !opts->checkout_index)
> > + die(_("neither '%s' or '%s' is specified"),
> > + "--index", "--worktree");
>
> Is this die() or BUG()? I thought --worktree was the default.The user might type "git restore --no-worktree --no-index" which would trigger this error message, so definitely die(), not a BUG().