{"thread":{"id":"12637","subject":"Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","startedAt":"2008-03-11T12:33:21Z","lastAt":"2008-03-12T13:11:17Z","messageCount":13,"participants":["Whit Armstrong","Johannes Schindelin","Asheesh Laroia","Johannes Sixt","David Kastrup","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71690","messageId":"8ec76080803110533m14041aebhc779d117a5bb6112@mail.gmail.com","threadId":"12637","inReplyTo":null,"subject":"Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-03-11T12:33:21Z","receivedAt":"2008-03-11T12:33:21Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"Git Version: git-1.5.4.4\n\nxs5-trd-p1.grn:warmstro> uname -a\nSunOS xs5-trd-p1.grn.tudor.com 5.9 Generic_118558-38 sun4u sparc\nSUNW,Sun-Fire-V240\n\nlooks like most errors below are related to tr.  The tr I'm using is in xpg4.\n\nxs5-trd-p1.grn:warmstro> which tr\n/usr/xpg4/bin/tr\n\n\n\nxs5-trd-p1.grn:warmstro> sh t0021-conversion.sh -i -v\n* expecting success:\n        git config filter.rot13.smudge ./rot13.sh &&\n        git config filter.rot13.clean ./rot13.sh &&\n\n        {\n            echo \"*.t filter=rot13\"\n            echo \"*.i ident\"\n        } >.gitattributes &&\n\n        {\n            echo a b c d e f g h i j k l m\n            echo n o p q r s t u v w x y z\n            echo '$Id$'\n        } >test &&\n        cat test >test.t &&\n        cat test >test.o &&\n        cat test >test.i &&\n        git add test test.t test.i &&\n        rm -f test test.t test.i &&\n        git checkout -- test test.t test.i\n\ntr: Bad string.\nerror: external filter ./rot13.sh failed 1\nerror: waitpid (async) failed\nerror: external filter ./rot13.sh failed\ntr: Bad string.\nerror: external filter ./rot13.sh failed 1\nerror: waitpid (async) failed\nerror: external filter ./rot13.sh failed\ntr: Bad string.\nerror: external filter ./rot13.sh failed 1\nerror: waitpid (async) failed\nerror: external filter ./rot13.sh failed\n*   ok 1: setup\n\n* expecting success:\n\n        cmp test.o test &&\n        cmp test.o test.t &&\n\n        # ident should be stripped in the repository\n        git diff --raw --exit-code :test :test.i &&\n        id=$(git rev-parse --verify :test) &&\n        embedded=$(sed -ne \"$script\" test.i) &&\n        test \"z$id\" = \"z$embedded\" &&\n\n        git cat-file blob :test.t > test.r &&\n\n        ./rot13.sh < test.o > test.t &&\n        cmp test.r test.t\n\ntr: Bad string.\n* FAIL 2: check\n\n\n                cmp test.o test &&\n                cmp test.o test.t &&\n\n                # ident should be stripped in the repository\n                git diff --raw --exit-code :test :test.i &&\n                id=$(git rev-parse --verify :test) &&\n                embedded=$(sed -ne \"$script\" test.i) &&\n                test \"z$id\" = \"z$embedded\" &&\n\n                git cat-file blob :test.t > test.r &&\n\n                ./rot13.sh < test.o > test.t &&\n                cmp test.r test.t\n\nxs5-trd-p1.grn:warmstro>\n"},{"id":"71693","messageId":"alpine.LSU.1.00.0803111352200.3873@racer.site","threadId":"12637","inReplyTo":"8ec76080803110533m14041aebhc779d117a5bb6112@mail.gmail.com","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-11T12:52:55Z","receivedAt":"2008-03-11T12:52:55Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 11 Mar 2008, Whit Armstrong wrote:\n\n> tr: Bad string.\n\nWhat string?\n\n> tr: Bad string.\n\nWhat string?\n\n> tr: Bad string.\n\nWhat...\n\nyou get the idea.\n\nCiao,\nDscho\n"},{"id":"71736","messageId":"alpine.DEB.1.00.0803110954360.4428@alchemy.localdomain","threadId":"12637","inReplyTo":"8ec76080803110533m14041aebhc779d117a5bb6112@mail.gmail.com","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2008-03-11T16:55:38Z","receivedAt":"2008-03-11T16:55:38Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Tue, 11 Mar 2008, Whit Armstrong wrote:\n\n> xs5-trd-p1.grn:warmstro> sh t0021-conversion.sh -i -v\n\nTry running this as \"sh -x t0021-conversion.sh -i -v\".  That will print \nthe exact commands run just before they are run, letting you figure \nout what tr is complaining about.\n\n-- Asheesh.\n\n-- \nI know what \"custody\" [of the children] means.  \"Get even.\"  That's all\ncustody means.  Get even with your old lady.\n \t\t-- Lenny Bruce\n"},{"id":"71737","messageId":"8ec76080803111014w209e1ceep9baf6d5c8c7f6a20@mail.gmail.com","threadId":"12637","inReplyTo":"alpine.DEB.1.00.0803110954360.4428@alchemy.localdomain","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-03-11T17:14:39Z","receivedAt":"2008-03-11T17:14:39Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"Thanks for the suggestion.  I found a few things in trash:\n\nxs5-trd-p1.grn:warmstro> pwd\n/home/warmstro/download/solaris/git-1.5.4.4/t/trash\nxs5-trd-p1.grn:warmstro> cat rot13.sh\ntr '[a-zA-Z]' '[n-za-mN-ZA-M]'\nxs5-trd-p1.grn:warmstro> tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\ntr: Bad string.\nxs5-trd-p1.grn:warmstro>\n\ndoes that help, or do you need a bit more than that?\n\n-Whit\n\n\n\n\n\nOn Tue, Mar 11, 2008 at 12:55 PM, Asheesh Laroia <asheesh@asheesh.org> wrote:\n> On Tue, 11 Mar 2008, Whit Armstrong wrote:\n>\n>\n> > xs5-trd-p1.grn:warmstro> sh t0021-conversion.sh -i -v\n>\n>  Try running this as \"sh -x t0021-conversion.sh -i -v\".  That will print\n>  the exact commands run just before they are run, letting you figure\n>  out what tr is complaining about.\n>\n>  -- Asheesh.\n>\n>  --\n>  I know what \"custody\" [of the children] means.  \"Get even.\"  That's all\n>  custody means.  Get even with your old lady.\n>                 -- Lenny Bruce\n>\n"},{"id":"71738","messageId":"47D6BE8D.3070009@viscovery.net","threadId":"12637","inReplyTo":"alpine.LSU.1.00.0803111352200.3873@racer.site","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-03-11T17:17:01Z","receivedAt":"2008-03-11T17:17:01Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Schindelin schrieb:\n> Hi,\n> \n> On Tue, 11 Mar 2008, Whit Armstrong wrote:\n> \n>> tr: Bad string.\n> \n> What string?\n\nIt's this tr, which is the implementation of ./rot13.sh:\n\n   tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n\nI can't tell what's wrong with it on Solaris, though.\n\n-- Hannes\n"},{"id":"71740","messageId":"86abl5f9kp.fsf@lola.quinscape.zz","threadId":"12637","inReplyTo":"47D6BE8D.3070009@viscovery.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2008-03-11T17:35:02Z","receivedAt":"2008-03-11T17:35:02Z","isPatch":false,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n> Johannes Schindelin schrieb:\n>> Hi,\n>> \n>> On Tue, 11 Mar 2008, Whit Armstrong wrote:\n>> \n>>> tr: Bad string.\n>> \n>> What string?\n>\n> It's this tr, which is the implementation of ./rot13.sh:\n>\n>    tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n>\n> I can't tell what's wrong with it on Solaris, though.\n\nThe brackets?\n\n-- \nDavid Kastrup\n"},{"id":"71741","messageId":"20080311173536.GA14687@sigill.intra.peff.net","threadId":"12637","inReplyTo":"8ec76080803111014w209e1ceep9baf6d5c8c7f6a20@mail.gmail.com","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-11T17:35:37Z","receivedAt":"2008-03-11T17:35:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Mar 11, 2008 at 01:14:39PM -0400, Whit Armstrong wrote:\n\n> Thanks for the suggestion.  I found a few things in trash:\n> \n> xs5-trd-p1.grn:warmstro> pwd\n> /home/warmstro/download/solaris/git-1.5.4.4/t/trash\n> xs5-trd-p1.grn:warmstro> cat rot13.sh\n> tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n> xs5-trd-p1.grn:warmstro> tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n> tr: Bad string.\n> xs5-trd-p1.grn:warmstro>\n> \n> does that help, or do you need a bit more than that?\n\nLooks like /usr/ucb/tr is OK with this, but /usr/bin/tr is not. Both\nseem to handle the more verbose:\n\ntr \\\n  'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n  'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n\njust fine.\n\n-Peff\n"},{"id":"71743","messageId":"20080311174045.GB14687@sigill.intra.peff.net","threadId":"12637","inReplyTo":"20080311173536.GA14687@sigill.intra.peff.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-11T17:40:45Z","receivedAt":"2008-03-11T17:40:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Mar 11, 2008 at 01:35:37PM -0400, Jeff King wrote:\n\n> Looks like /usr/ucb/tr is OK with this, but /usr/bin/tr is not. Both\n> seem to handle the more verbose:\n> \n> tr \\\n>   'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n>   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n\nAnd here it is in patch form.\n\n-- >8 --\nt0021: tr portability fix for Solaris\n\nSolaris' /usr/bin/tr doesn't seem to like multiple character\nranges in brackets (it simply prints \"Bad string\"). Instead,\nlet's just enumerate the transformation we want.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/t0021-conversion.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex cb86029..8fc39d7 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -5,7 +5,9 @@ test_description='blob conversion via gitattributes'\n . ./test-lib.sh\n \n cat <<\\EOF >rot13.sh\n-tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n+tr \\\n+  'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n+  'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n EOF\n chmod +x rot13.sh\n \n-- \n1.5.4.3.621.g34987\n"},{"id":"71744","messageId":"8ec76080803111058i19d3ae42g87366b31f3df4045@mail.gmail.com","threadId":"12637","inReplyTo":"20080311174045.GB14687@sigill.intra.peff.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-03-11T17:58:26Z","receivedAt":"2008-03-11T17:58:26Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"works great.  thanks.\n\nrunning rest of test suite now.\n\n\nOn Tue, Mar 11, 2008 at 1:40 PM, Jeff King <peff@peff.net> wrote:\n> On Tue, Mar 11, 2008 at 01:35:37PM -0400, Jeff King wrote:\n>\n>  > Looks like /usr/ucb/tr is OK with this, but /usr/bin/tr is not. Both\n>  > seem to handle the more verbose:\n>  >\n>  > tr \\\n>  >   'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n>  >   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n>\n>  And here it is in patch form.\n>\n>  -- >8 --\n>  t0021: tr portability fix for Solaris\n>\n>  Solaris' /usr/bin/tr doesn't seem to like multiple character\n>  ranges in brackets (it simply prints \"Bad string\"). Instead,\n>  let's just enumerate the transformation we want.\n>\n>  Signed-off-by: Jeff King <peff@peff.net>\n>  ---\n>   t/t0021-conversion.sh |    4 +++-\n>   1 files changed, 3 insertions(+), 1 deletions(-)\n>\n>  diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\n>  index cb86029..8fc39d7 100755\n>  --- a/t/t0021-conversion.sh\n>  +++ b/t/t0021-conversion.sh\n>  @@ -5,7 +5,9 @@ test_description='blob conversion via gitattributes'\n>   . ./test-lib.sh\n>\n>   cat <<\\EOF >rot13.sh\n>\n> -tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\n>  +tr \\\n>  +  'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n>  +  'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n>   EOF\n>   chmod +x rot13.sh\n>\n>  --\n>  1.5.4.3.621.g34987\n>\n>\n"},{"id":"71774","messageId":"7vhcfc8tu7.fsf@gitster.siamese.dyndns.org","threadId":"12637","inReplyTo":"20080311174045.GB14687@sigill.intra.peff.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-12T04:11:28Z","receivedAt":"2008-03-12T04:11:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> Looks like /usr/ucb/tr is OK with this, but /usr/bin/tr is not. Both\n>> seem to handle the more verbose:\n>> \n>> tr \\\n>>   'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \\\n>>   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'\n\nBesides tests, I think we have invocations of \"tr\" that Solaris people\nmight want to audit in the real scripts.  POSIX does not require [] around\nthe strings, but when from-string and to-string are of the same length,\nhaving [] around them would not hurt (they transliterate to themselves)\nand that is the only reason why we tend to use [] form to help potential\nporters to ancient System V systems ;-)\n\nfilter-branch uses A-Z (BSD style) range which also is Kosher in POSIX but\nwill break historical System V that requires [] around ranges.\n\nbisect has \"tr '[\\012]' ' '\" which I think we can get rid of by rewriting\nthe users of the resulting string.\n"},{"id":"71803","messageId":"20080312124336.GA7873@coredump.intra.peff.net","threadId":"12637","inReplyTo":"7vhcfc8tu7.fsf@gitster.siamese.dyndns.org","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-12T12:43:36Z","receivedAt":"2008-03-12T12:43:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Mar 11, 2008 at 09:11:28PM -0700, Junio C Hamano wrote:\n\n> Besides tests, I think we have invocations of \"tr\" that Solaris people\n> might want to audit in the real scripts.  POSIX does not require [] around\n> the strings, but when from-string and to-string are of the same length,\n> having [] around them would not hurt (they transliterate to themselves)\n> and that is the only reason why we tend to use [] form to help potential\n> porters to ancient System V systems ;-)\n\nI'm not sure that it is always OK to just put in extra brackets, at\nleast in the case of multiple ranges. Consider the patch I just posted:\n\n$ uname -a\nSunOS tokyo 5.8 Generic_117350-47 sun4u sparc SUNW,Ultra-4\n\n# what we have now, ok with bsd\n$ echo foo | /usr/ucb/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'\nsbb\n\n# what we have now, broken with SysV because of multiple ranges\necho foo | /usr/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'\nBad string\n\n# potential fix, break multiple ranges. works with SysV\necho foo | /usr/bin/tr '[A-Z][a-z]' '[N-Z][A-M][n-z][a-m]'\nsbb\n\n# but here it breaks bsd\necho foo | /usr/ucb/tr '[A-Z][a-z]' '[N-Z][A-M][n-z][a-m]'\nqzz\n\n\nwhich makes no sense to me at all. If it were ignoring the duplicated\n'[' on input, then I could understand a shift of one character. But\nthere is a shift of two characters.\n\n> bisect has \"tr '[\\012]' ' '\" which I think we can get rid of by rewriting\n> the users of the resulting string.\n\nThis one is just being overzealous with the brackets. There is no need\nfor them unless there is a character sequence. This works correctly as\n\n   tr '\\012' ' '\n\nat least using the Solaris SysV tr.\n\nBelow is a patch that fixes all of the problematic sites I found. Each\nfix type was hand-tested with the Solaris SysV and UCB versions of tr,\nand the tests ran successfully on Linux. On Solaris, I tried the tests\nusing /usr/bin/tr. However, I ran into problems with t1300, which tries:\n\n  tr '\\000' 'Q'\n\nIt seems that /usr/bin/tr silently removes NULs from the input stream:\n\n  $ printf 'foo\\000bar' | xxd\n  0000000: 666f 6f00 6261 72                        foo.bar\n  $ printf 'foo\\000bar' | /usr/bin/tr '\\000' 'Q' | xxd\n  0000000: 666f 6f62 6172                           foobar\n\nI don't think there is an easy way around this; we might have to switch\nto using perl.\n\n-- >8 --\ntr portability fixes\n\nSpecifying character ranges in tr differs between System V\nand POSIX. In System V, brackets are required (e.g.,\n'[A-Z]'), whereas in POSIX they are not.\n\nWe can mostly get around this by just using the bracket form\nfor both sets, as in:\n\n  tr '[A-Z] '[a-z]'\n\nin which case POSIX interpets this as \"'[' becomes '['\",\nwhich is OK.\n\nHowever, this doesn't work with multiple sequences, like:\n\n  # rot13\n  tr '[A-Z][a-z]' '[N-Z][A-M][n-z][a-m]'\n\nwhere the POSIX version does not behave the same as the\nSystem V version. In this case, we must simply enumerate the\nsequence.\n\nThis patch fixes problematic uses of tr in git scripts and\ntest scripts in one of three ways:\n\n  - if a single sequence, make sure it uses brackets\n  - if multiple sequences, enumerate\n  - if extra brackets (e.g., tr '[A]' 'a'), eliminate\n    brackets\n---\n git-bisect.sh            |    4 ++--\n git-filter-branch.sh     |    4 ++--\n t/t4022-diff-rewrite.sh  |    5 ++++-\n t/t7003-filter-branch.sh |    2 +-\n 4 files changed, 9 insertions(+), 6 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 2c32d0b..48fb92d 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -293,14 +293,14 @@ bisect_next() {\n \tbisect_next_check good\n \n \tskip=$(git for-each-ref --format='%(objectname)' \\\n-\t\t\"refs/bisect/skip-*\" | tr '[\\012]' ' ') || exit\n+\t\t\"refs/bisect/skip-*\" | tr '\\012' ' ') || exit\n \n \tBISECT_OPT=''\n \ttest -n \"$skip\" && BISECT_OPT='--bisect-all'\n \n \tbad=$(git rev-parse --verify refs/bisect/bad) &&\n \tgood=$(git for-each-ref --format='^%(objectname)' \\\n-\t\t\"refs/bisect/good-*\" | tr '[\\012]' ' ') &&\n+\t\t\"refs/bisect/good-*\" | tr '\\012' ' ') &&\n \teval=\"git rev-list --bisect-vars $BISECT_OPT $good $bad --\" &&\n \teval=\"$eval $(cat \"$GIT_DIR/BISECT_NAMES\")\" &&\n \teval=$(filter_skipped \"$eval\" \"$skip\") &&\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 010353a..59cf023 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -58,8 +58,8 @@ eval \"$functions\"\n # \"author\" or \"committer\n \n set_ident () {\n-\tlid=\"$(echo \"$1\" | tr \"A-Z\" \"a-z\")\"\n-\tuid=\"$(echo \"$1\" | tr \"a-z\" \"A-Z\")\"\n+\tlid=\"$(echo \"$1\" | tr \"[A-Z]\" \"[a-z]\")\"\n+\tuid=\"$(echo \"$1\" | tr \"[a-z]\" \"[A-Z]\")\"\n \tpick_id_script='\n \t\t/^'$lid' /{\n \t\t\ts/'\\''/'\\''\\\\'\\'\\''/g\ndiff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh\nindex 6de4acb..bf996fc 100755\n--- a/t/t4022-diff-rewrite.sh\n+++ b/t/t4022-diff-rewrite.sh\n@@ -8,7 +8,10 @@ test_expect_success setup '\n \n \tcat ../../COPYING >test &&\n \tgit add test &&\n-\ttr 'a-zA-Z' 'n-za-mN-ZA-M' <../../COPYING >test\n+\ttr \\\n+\t  \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\" \\\n+\t  \"nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM\" \\\n+\t  <../../COPYING >test\n \n '\n \ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex 6e14bf1..553131f 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -4,7 +4,7 @@ test_description='git-filter-branch'\n . ./test-lib.sh\n \n make_commit () {\n-\tlower=$(echo $1 | tr A-Z a-z)\n+\tlower=$(echo $1 | tr '[A-Z]' '[a-z]')\n \techo $lower > $lower\n \tgit add $lower\n \ttest_tick\n-- \n1.5.4.3.613.gdd757\n"},{"id":"71804","messageId":"20080312124825.GA8447@coredump.intra.peff.net","threadId":"12637","inReplyTo":"20080312124336.GA7873@coredump.intra.peff.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-12T12:48:25Z","receivedAt":"2008-03-12T12:48:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 12, 2008 at 08:43:36AM -0400, Jeff King wrote:\n\n> It seems that /usr/bin/tr silently removes NULs from the input stream:\n> \n>   $ printf 'foo\\000bar' | xxd\n>   0000000: 666f 6f00 6261 72                        foo.bar\n>   $ printf 'foo\\000bar' | /usr/bin/tr '\\000' 'Q' | xxd\n>   0000000: 666f 6f62 6172                           foobar\n> \n> I don't think there is an easy way around this; we might have to switch\n> to using perl.\n\nEven more exciting, /usr/bin/tr actually works going the opposite\ndirection, but /usr/ucb/tr doesn't:\n\n  $ echo x | /usr/bin/tr x '\\000' | xxd\n  0000000: 000a                                     ..\n  $ echo x | /usr/ucb/tr x '\\000' | xxd\n  0000000: 780a                                     x.\n\nbut other characters seem to work:\n\n  $ echo x | /usr/ucb/tr x '\\012' | xxd\n  0000000: 0a0a                                     ..\n\n-Peff\n"},{"id":"71805","messageId":"alpine.LSU.1.00.0803121410090.1656@racer.site","threadId":"12637","inReplyTo":"20080312124825.GA8447@coredump.intra.peff.net","subject":"Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-12T13:11:17Z","receivedAt":"2008-03-12T13:11:17Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 12 Mar 2008, Jeff King wrote:\n\n> On Wed, Mar 12, 2008 at 08:43:36AM -0400, Jeff King wrote:\n> \n> > It seems that /usr/bin/tr silently removes NULs from the input stream:\n> > \n> >   $ printf 'foo\\000bar' | xxd\n> >   0000000: 666f 6f00 6261 72                        foo.bar\n> >   $ printf 'foo\\000bar' | /usr/bin/tr '\\000' 'Q' | xxd\n> >   0000000: 666f 6f62 6172                           foobar\n> > \n> > I don't think there is an easy way around this; we might have to switch\n> > to using perl.\n> \n> Even more exciting, /usr/bin/tr actually works going the opposite\n> direction, but /usr/ucb/tr doesn't:\n> \n>   $ echo x | /usr/bin/tr x '\\000' | xxd\n>   0000000: 000a                                     ..\n>   $ echo x | /usr/ucb/tr x '\\000' | xxd\n>   0000000: 780a                                     x.\n> \n> but other characters seem to work:\n> \n>   $ echo x | /usr/ucb/tr x '\\012' | xxd\n>   0000000: 0a0a                                     ..\n\nAll the more reson to make more things builtin.  (I agree that for tests, \nwe should stay with tr, though.)\n\nCiao,\nDscho\n"}]}