git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH - maint review] show-branch: handle [] globs as well.

From
Junio C Hamano <junkio@cox.net>
Date
Jan 12, 2006, 00:04 UTC
Message-ID
<7v64oql39z.fsf@assigned-by-dhcp.cox.net>

Earlier only '?' and '*' signalled the command that what the user has given is a glob pattern. This prevented us to say:

	$ git show-branch 'v0.99.[0-3]'
Now we notice '[' as well, so the above would work.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * For 1.0.10 and 1.1.2
 show-branch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
87758f975b04233ba058750f7ea8ce63bb67297f
diff --git a/show-branch.c b/show-branch.c
index 15b1968..1935c44 100644
--- a/show-branch.c
+++ b/show-branch.c
@@ -492,7 +492,7 @@ static void append_one_rev(const char *a
 		append_ref(av, revkey);
 		return;
 	}
-	if (strchr(av, '*') || strchr(av, '?')) {
+	if (strchr(av, '*') || strchr(av, '?') || strchr(av, '[')) {
 		/* glob style match */
 		int saved_matches = ref_name_cnt;
 		match_ref_pattern = av;
-- 
1.1.1-g8ecb
Message 1 of 1 in “show-branch: handle [] globs as well.”
  1. show-branch: handle [] globs as well.Junio C Hamano, Jan 12, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.