All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH] git-tag: fix -l switch handling regression.
Date: Fri, 21 Dec 2007 11:50:58 +0100	[thread overview]
Message-ID: <20071221105058.GD17701@artemis.madism.org> (raw)
In-Reply-To: <20071221104704.GC17701@artemis.madism.org>

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---

It seems that you didnt took that patch either, that IMHO gives a better
semantics to git tag -l than yours, while keeping backward
compatibility.


 builtin-tag.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/builtin-tag.c b/builtin-tag.c
index 274901a..020ee1c 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -16,7 +16,7 @@
 static const char * const git_tag_usage[] = {
 	"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
 	"git-tag -d <tagname>...",
-	"git-tag [-n [<num>]] -l [<pattern>]",
+	"git-tag -l [-n [<num>]] [<pattern>]",
 	"git-tag -v <tagname>...",
 	NULL
 };
@@ -370,13 +370,11 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 	struct ref_lock *lock;
 
 	int annotate = 0, sign = 0, force = 0, lines = 0,
-					delete = 0, verify = 0;
-	char *list = NULL, *msgfile = NULL, *keyid = NULL;
-	const char *no_pattern = "NO_PATTERN";
+		list = 0, delete = 0, verify = 0;
+	char *msgfile = NULL, *keyid = NULL;
 	struct msg_arg msg = { 0, STRBUF_INIT };
 	struct option options[] = {
-		{ OPTION_STRING, 'l', NULL, &list, "pattern", "list tag names",
-			PARSE_OPT_OPTARG, NULL, (intptr_t) no_pattern },
+		OPT_BOOLEAN('l', NULL, &list, "list tag names"),
 		{ OPTION_INTEGER, 'n', NULL, &lines, NULL,
 				"print n lines of each tag message",
 				PARSE_OPT_OPTARG, NULL, 1 },
@@ -408,7 +406,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 		annotate = 1;
 
 	if (list)
-		return list_tags(list == no_pattern ? NULL : list, lines);
+		return list_tags(argv[0], lines);
 	if (delete)
 		return for_each_tag_name(argv, delete_tag);
 	if (verify)
-- 
1.5.4.rc1.1096.g37c7b


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-12-21 10:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  0:32 1.5.4-rc2 plans Junio C Hamano
2007-12-21  7:26 ` Johannes Sixt
2007-12-21  9:09   ` Mike Frysinger
2007-12-22 15:04     ` Johannes Schindelin
2007-12-22 17:54       ` Mike Frysinger
2007-12-21  8:57 ` Steven Grimm
2007-12-21 10:47 ` Pierre Habouzit
2007-12-21 10:50   ` Pierre Habouzit [this message]
2007-12-21 16:32     ` [PATCH] git-tag: fix -l switch handling regression Junio C Hamano
2007-12-21 21:18       ` Pierre Habouzit
2007-12-22  8:01         ` Junio C Hamano
2007-12-21 11:06   ` 1.5.4-rc2 plans Junio C Hamano
2007-12-21 11:13     ` Pierre Habouzit
2007-12-21 11:19       ` [PATCH] parse-options: Add a gitcli(5) man page Pierre Habouzit
2007-12-22 15:05 ` 1.5.4-rc2 plans Johannes Schindelin
2007-12-22 17:03 ` Pierre Habouzit
2007-12-22 17:16   ` Junio C Hamano
2007-12-22 17:38     ` Pierre Habouzit
2007-12-22 17:52     ` 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=20071221105058.GD17701@artemis.madism.org \
    --to=madcoder@debian.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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.