From: ZheNing Hu Date: Sat, 11 Dec 2021 06:34:46 GMT Subject: Re: [PATCH 2/2] checkout: introduce "--to-branch" option Message-ID: In-Reply-To: Christian Couder 于2021年12月10日周五 16:34写道: > > [verse] > > 'git checkout' [-q] [-f] [-m] [] > > 'git checkout' [-q] [-f] [-m] --detach [] > > -'git checkout' [-q] [-f] [-m] [--detach] > > +'git checkout' [-q] [-f] [-m] [--detach] [-w|--to-branch] > > It's a bit strange that --detach can be used along with the new > option, as the purpose of the new option is to not detach. It makes > one wonder what happens when both --detach and --to-branch are used. > When both --detach and --to-branch are used, --detach will work... Of course, it should be reasonable to prevent them from being used at the same time. > I wonder if all the following lines: > > git checkout [-q] [-f] [-m] [] > git checkout [-q] [-f] [-m] --detach [] > git checkout [-q] [-f] [-m] [--detach] > > could be replaced with just: > > git checkout [-q] [-f] [-m] [--detach|--to-branch] > Well, it will be much more concise. > > 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] > > 'git checkout' [-f|--ours|--theirs|-m|--conflict=