From: Ævar Arnfjörð Bjarmason Date: Sat, 15 Jan 2022 01:02:15 GMT Subject: Re: [RFC PATCH v1 0/1] ls-remote: inconsistency from the order of args and opts Message-ID: <220115.86czktrelu.gmgdl@evledraar.gmail.com> In-Reply-To: On Fri, Jan 14 2022, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> But we should really be recommending use of -- or --end-of-options >> whenever possible, as it can be hard to know in Git's CLI whether >> options after args are accepted or not. > > Way before doing so, we should recommend the "options and then args" > order. Users do not have to know which subcommands accepts options > after args. If you want to script git to do e.g.: touch -- foo -r git add foo -r git rm foo -r git status foo -r git log foo -r You do need to know that those won't work, if that "foo -r" is from e.g. scripted arguments that those commands will accept or interpret that -r as an argument. Hence suggesting that the user just add "--" to resolve the ambiguity, as gitcli already discusses.