From: Eric Sunshine Date: Sun, 10 Mar 2019 20:03:07 GMT Subject: Re: [PATCH v1 06/11] restore: add --worktree and --index Message-ID: In-Reply-To: On Sat, Mar 9, 2019 at 1:52 PM Elijah Newren wrote: > On Fri, Mar 8, 2019 at 2:17 AM Nguyễn Thái Ngọc Duy 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().