git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Cc: git <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] test-lib: allow short options to be stacked
Date: Sun, 22 Mar 2020 02:49:40 -0400	[thread overview]
Message-ID: <20200322064940.GA599744@coredump.intra.peff.net> (raw)
In-Reply-To: <CAHd-oW4cGEwyge+BPRGiOsmMxr5ne9Ufk-BOM4EgG_i6qTxxMg@mail.gmail.com>

On Sat, Mar 21, 2020 at 03:50:55PM -0300, Matheus Tavares Bernardino wrote:

> > which seems reasonable. But:
> >
> >   ./t1234-foo.sh -rr 5 6
> >
> > would get garbled.
> 
> ... we could prohibit using more than one "short option with
> arguments" in the same bundle. This would not only solve the problem
> for "-rr 5 6"[1] but also for the scenario of future new options. And
> it's quite simple to implement, we just have to check whether
> $store_arg_to is set before setting it to another value. I'll try that
> for v2.

Yeah, I'd be perfectly happy with that. This bundling is a new format
that did not exist before, so we are not taking away anything you could
previously do. As long as we don't produce a wrong or confusing result
(and instead say "don't do that; we don't support it", anybody else is
free to come along later and make it work. :)

> [1]: Someone that used '-rr 5 6' might have wanted the script to run
> *both* tests 5 and 6. But I don't think we need to support that now,
> since '-r 5 -r 6' doesn't do that as well (instead, the last value
> overrides all previous ones).

Heh, that's what I assumed "-r 5 -r 6" would do, but I guess it goes to
show that I do not use that option very much. :)

-Peff

  reply	other threads:[~2020-03-22  6:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  3:07 [PATCH] test-lib: allow short options to be stacked Matheus Tavares
2020-03-21  4:53 ` Junio C Hamano
2020-03-21 17:27   ` Matheus Tavares
2020-03-21  6:26 ` Jeff King
2020-03-21 18:50   ` Matheus Tavares Bernardino
2020-03-22  6:49     ` Jeff King [this message]
2020-03-22  8:14     ` SZEDER Gábor
2020-03-21 18:57   ` Junio C Hamano
2020-03-21  8:55 ` Johannes Sixt
2020-03-21 18:55   ` Matheus Tavares Bernardino
2020-03-21 20:11     ` Junio C Hamano
2020-03-21 19:57 ` [PATCH v2] test-lib: allow short options to be bundled Matheus Tavares
2020-03-21 20:07   ` Junio C Hamano
2020-03-21 22:42     ` Matheus Tavares Bernardino
2020-03-22 15:58   ` [PATCH v3] " Matheus Tavares
2020-03-23 20:18     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200322064940.GA599744@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=matheus.bernardino@usp.br \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).