summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 462f8ca)
raw | patch | inline | side by side (parent: 462f8ca)
author | Jeff King <peff@peff.net> | |
Sat, 15 Mar 2008 00:32:33 +0000 (20:32 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Mar 2008 00:53:22 +0000 (17:53 -0700) |
It seems that some implementations of tr don't like a
replacement string of '-----...'; they try to find the
double-dash option "---...".
Instead of this pipeline of tr and sed invocations, just use a
single perl invocation.
Signed-off-by: Jeff King <peff@peff.net>
replacement string of '-----...'; they try to find the
double-dash option "---...".
Instead of this pipeline of tr and sed invocations, just use a
single perl invocation.
Signed-off-by: Jeff King <peff@peff.net>
t/t6000lib.sh | patch | blob | history |
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index b69f7c4d1100ec7254d32665040e282a2fa97c2a..c0baaa536079b1213d83bbf234ac688567c95237 100755 (executable)
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
# from front and back.
name_from_description()
{
- tr "'" '-' |
- tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' \
- '------------------------------' |
- tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
+ perl -pe '
+ s/[^A-Za-z0-9.]/-/g;
+ s/-+/-/g;
+ s/-$//;
+ s/^-//;
+ y/A-Z/a-z/;
+ '
}