Skip to content

Commit cde2ed2

Browse files
peffgitster
authored andcommitted
t6000lib: tr portability fix
Some versions of tr complain if the number of characters in both sets isn't the same. So here we must manually expand the dashes in set2. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 53a5b44 commit cde2ed2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t6000lib.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ check_output()
9797
# from front and back.
9898
name_from_description()
9999
{
100-
tr "'" '-' | tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' '-' | tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
100+
tr "'" '-' |
101+
tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' \
102+
'------------------------------' |
103+
tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
101104
}
102105

103106

0 commit comments

Comments
 (0)