Re: [PATCH 3/8] tag: Change misleading --list <pattern> documentation
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 20, 2017, 16:09 UTC
- Message-ID
- <CACBZZX5V3fMpwUCFr8vXMsxkXpz353-BOtaANYvnu9Qnz1GSQg@mail.gmail.com>
- In-Reply-To
- <20170320034443.wq2uf4yabsxh2nji@sigill.intra.peff.net>
On Mon, Mar 20, 2017 at 4:44 AM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> On Sat, Mar 18, 2017 at 11:43:47AM -0700, Junio C Hamano wrote: > >> > +test_expect_success 'Multiple -l or --list options are equivalent to one -l option' ' >> > + git tag -l -l >actual && >> > + test_cmp expect actual && >> > + git tag --list --list >actual && >> > + test_cmp expect actual && >> > + git tag --list -l --list >actual && >> > + test_cmp expect actual >> > +' >> >> OK. I do not care too deeply about this one, but somebody may want >> to tighten up the command line parsing to detect conflicting or >> duplicated cmdmode as an error in the future, and at that time this >> will require updating. I am not sure if we want to promise that >> giving multiple -l will keep working. > > I think it's expected to work under the usual last-one-wins option > parsing. A more subtle case is that: > > git tag -l -d foo > > would override "-l" with "-d". That's reasonable under the same rule as > long as the user knows that the two are mode-selectors. I don't think we > make that explicit in the documentation, though, so perhaps it isn't > something users should rely on.
That hasn't been the case since v1.8.5 (v1.8.4-rc0-12-g1158826394). Now supplying multiple CMDMODE invocations will die.
It is the case that we still need to manually check any pseudo-cmdmode switches like "tag -a" (bool) v.s. "tag -l" (cmdmode). We check that particular combination, but we doubtless have bugs like that in other commands.