All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jean-Noël AVILA" <jn.avila@free.fr>
To: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org, "René Scharfe" <l.s.r@web.de>
Cc: "Jeff King" <peff@peff.net>, "Johannes Sixt" <j6t@kdbg.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v4 05/11] i18n: tag.c factorize i18n strings
Date: Sun, 02 Jan 2022 21:29:03 +0100	[thread overview]
Message-ID: <38167869.LCjkVZloL3@cayenne> (raw)
In-Reply-To: <657377f3-b751-1863-409c-544b439b544f@web.de>

On Sunday, 2 January 2022 18:37:02 CET René Scharfe wrote:
> Am 02.01.22 um 18:15 schrieb Jean-Noël Avila via GitGitGadget:
> > From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
> >
> > Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> > ---
> >  builtin/tag.c | 19 +++++++++++--------
> >  1 file changed, 11 insertions(+), 8 deletions(-)
> >
> > diff --git a/builtin/tag.c b/builtin/tag.c
> > index dfdcfd37956..82e09c1b83d 100644
> > --- a/builtin/tag.c
> > +++ b/builtin/tag.c
> > @@ -483,6 +483,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
> >  		OPT_END()
> >  	};
> >  	int ret = 0;
> > +	const char *only_in_list = NULL;
> >
> >  	setup_ref_filter_porcelain_msg();
> >
> > @@ -542,15 +543,17 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
> >  		goto cleanup;
> >  	}
> >  	if (filter.lines != -1)
> > -		die(_("-n option is only allowed in list mode"));
> > -	if (filter.with_commit)
> > -		die(_("--contains option is only allowed in list mode"));
> > -	if (filter.no_commit)
> > -		die(_("--no-contains option is only allowed in list mode"));
> > -	if (filter.points_at.nr)
> > -		die(_("--points-at option is only allowed in list mode"));
> > +		only_in_list = "-n";
> > +	else if (filter.with_commit)
> > +		only_in_list = "--contains";
> > +	else if (filter.no_commit)
> > +		only_in_list = "--no-contains";
> > +	else if (filter.points_at.nr)
> > +		only_in_list = "--points-at";
> > +	if (only_in_list)
> > +		die(_("the '%s' option is only allowed in list mode"), only_in_list);
> >  	if (filter.reachable_from || filter.unreachable_from)
> > -		die(_("--merged and --no-merged options are only allowed in list mode"));
> > +		die(_("'--merged' and '--no-merged' options are only allowed in list mode"));
> 
> What I meant in my earlier reply was: Shouldn't --merged and --no-merged
> be handled like the other options that require list mode?
> 
> 	else if (filter.reachable_from)
> 		only_in_list = "--merged";
> 	else if (filter.unreachable_from)
> 		only_in_list = "--no-merged";
> 

Oh. That's neat! Sorry for having missed that.




  reply	other threads:[~2022-01-02 20:29 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  7:01 [PATCH 00/10] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 01/10] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-07 18:07   ` Ævar Arnfjörð Bjarmason
2021-12-08 18:13     ` Jean-Noël AVILA
2021-12-03  7:01 ` [PATCH 02/10] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 03/10] i18n: turn "options are incompatible" into "are " Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 04/10] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-07 18:09   ` Ævar Arnfjörð Bjarmason
2021-12-03  7:01 ` [PATCH 05/10] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2021-12-07 18:10   ` Ævar Arnfjörð Bjarmason
2021-12-03  7:01 ` [PATCH 06/10] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 07/10] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 08/10] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-07 18:15   ` Ævar Arnfjörð Bjarmason
2021-12-03  7:01 ` [PATCH 09/10] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-03  7:01 ` [PATCH 10/10] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-03 21:55 ` [PATCH 00/10] Factorization of messages with similar meaning Jeff King
2021-12-03 23:39   ` Johannes Sixt
2021-12-05  7:31     ` Junio C Hamano
2021-12-05 17:25       ` Jean-Noël AVILA
2021-12-05 19:50         ` Johannes Sixt
2021-12-06 19:18           ` Junio C Hamano
2021-12-05 19:30 ` Junio C Hamano
2021-12-27 23:23 ` [PATCH v2 00/11] " Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2021-12-27 23:42     ` Junio C Hamano
2021-12-27 23:45       ` Ævar Arnfjörð Bjarmason
2021-12-28  0:16         ` Junio C Hamano
2021-12-29 14:05           ` Jean-Noël AVILA
2021-12-27 23:23   ` [PATCH v2 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-28  7:01     ` Johannes Sixt
2021-12-29 14:02       ` Jean-Noël AVILA
2021-12-27 23:23   ` [PATCH v2 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23   ` [PATCH v2 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2021-12-28  7:33     ` Johannes Sixt
2021-12-29 15:49       ` Jean-Noël AVILA
2021-12-29 18:54   ` [PATCH v3 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2021-12-29 18:54     ` [PATCH v3 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-29 18:54     ` [PATCH v3 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2021-12-30 22:26       ` Junio C Hamano
2021-12-31 17:05         ` Jean-Noël AVILA
2021-12-29 18:54     ` [PATCH v3 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2021-12-29 19:36       ` Johannes Sixt
2021-12-30 16:52         ` Jean-Noël AVILA
2021-12-30 22:36           ` Junio C Hamano
2021-12-29 18:55     ` [PATCH v3 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55     ` [PATCH v3 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-01 14:14       ` René Scharfe
2021-12-29 18:55     ` [PATCH v3 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-29 18:55     ` [PATCH v3 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-30 22:36       ` Junio C Hamano
2021-12-29 18:55     ` [PATCH v3 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-29 18:55     ` [PATCH v3 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55     ` [PATCH v3 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55     ` [PATCH v3 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2021-12-30 22:36       ` Junio C Hamano
2021-12-31 17:16         ` Jean-Noël AVILA
2022-01-03 21:51           ` Junio C Hamano
2022-01-02 17:15     ` [PATCH v4 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2022-01-03 15:44         ` Johannes Sixt
2022-01-02 17:15       ` [PATCH v4 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-02 17:37         ` René Scharfe
2022-01-02 20:29           ` Jean-Noël AVILA [this message]
2022-01-02 17:15       ` [PATCH v4 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15       ` [PATCH v4 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2022-01-05 20:02       ` [PATCH v5 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02         ` [PATCH v5 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2022-01-05 20:58         ` [PATCH v5 00/11] Factorization of messages with similar meaning Johannes Sixt
2022-01-05 21:31           ` 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

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

  git send-email \
    --in-reply-to=38167869.LCjkVZloL3@cayenne \
    --to=jn.avila@free.fr \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=j6t@kdbg.org \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.