From: Eric Sunshine Date: Thu, 31 Jan 2019 07:20:56 GMT Subject: Re: [PATCH 08/19] checkout: split part of it to new command switch Message-ID: In-Reply-To: On Thu, Jan 31, 2019 at 1:24 AM Eric Sunshine wrote: > On Thu, Jan 31, 2019 at 12:29 AM Duy Nguyen wrote: > > On Thu, Jan 31, 2019 at 7:50 AM Eric Sunshine wrote: > > > On Wed, Jan 30, 2019 at 4:49 AM Nguyễn Thái Ngọc Duy wrote: > > > > +'git switch' [] [--guess] > > > > +'git switch' [] --detach [>] > > > > +'git switch' [] [[-c|-C|--orphan] ] [] > > > > > > What does the third form mean when all optional arguments (that is, > > > _all_ arguments) are omitted? > > > > "git switch" is smart (or too dumb to be clever): > > > > $ git switch > > fatal: nothing to do > > But does it need to be this way? Does it make a good user-experience? > I, personally, find it confusing to see that it can accept no > arguments. An alternative, perhaps more consistent with UX elsewhere: > > $ git switch > fatal: missing branch argument > > or something. Let me clarify by saying that I don't understand why the third form is documented as validly accepting no arguments given that a no-argument invocation is an error. That is, I would expect the third form of the synopsis to say: 'git switch' [] (-c|-C|--orphan) []