Skip to content

Commit 87758f9

Browse files
author
Junio C Hamano
committed
show-branch: handle [] globs as well.
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>
1 parent 2c817df commit 87758f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show-branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static void append_one_rev(const char *av)
492492
append_ref(av, revkey);
493493
return;
494494
}
495-
if (strchr(av, '*') || strchr(av, '?')) {
495+
if (strchr(av, '*') || strchr(av, '?') || strchr(av, '[')) {
496496
/* glob style match */
497497
int saved_matches = ref_name_cnt;
498498
match_ref_pattern = av;

0 commit comments

Comments
 (0)