Cogito limitation in tag names?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Cogito limitation in tag names?

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:14

 From cg-tag in 0.16:

(echo $name | egrep -qv '[^a-zA-Z0-9_.@!:-]') || \
         die "name contains invalid characters"

WHY?  I can see rejecting control characters, but the above will reject 
pretty much anything written in a non-English language, which is rude to 
say the least...

	-hpa

[PATCH] [COGITO] make cg-tag use git-check-ref-format

From: Martin Atukunda <hidden>
Date: 2016-06-15 22:42:14

The egrep pattern used by cg-tag is too restrictive. While it will prevent
control characters from being specified as a tag name, it will also reject
nearly anything written in a non-English language, as noted by -hpa

Signed-off-by: Martin Atukunda <redacted>

---

 cg-tag |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

187670279068e7177149765a7f736cc565a1fe19
diff --git a/cg-tag b/cg-tag
index da4f2d5..73616b8 100755
--- a/cg-tag
+++ b/cg-tag
@@ -54,7 +54,7 @@ id=$(cg-object-id -n "$id") || exit 1
 type=$(git-cat-file -t "$id")
 id=${id% *}
 
-(echo $name | egrep -qv '[^a-zA-Z0-9_.@!:-]') || \
+git-check-ref-format $name || \
 	die "name contains invalid characters"
 
 mkdir -p $_git/refs/tags
-- 
0.99.9.GIT
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help