Skip to contentSkip to conversation

show-branch: handle [] globs as well.

PATCH New Junio C Hamano 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
* For 1.0.10 and 1.1.2

 show-branch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

87758f975b04233ba058750f7ea8ce63bb67297f

show-branch.c +1 -1
index 15b1968..1935c44 100644
@@ -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;
Signature · 1 line
1.1.1-g8ecb