eval "$filter_tree" < /dev/null ||
                        die "tree filter failed: $filter_tree"
 
-               git diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
+               git diff-index -r $commit | cut -f 2- | tr '\n' '\000' | \
                        xargs -0 git update-index --add --replace --remove
                git ls-files -z --others | \
                        xargs -0 git update-index --add --replace --remove
 
     # Also we do not check SHA1 hash generation in this test, which
     # is a job for t0000-basic.sh
 
-    tr '\0' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1
-    tr '\0' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2
+    tr '\000' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1
+    tr '\000' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2
     git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
 }
 
 
 . ./test-lib.sh
 
 q_to_nul () {
-       tr Q '\0'
+       tr Q '\000'
 }
 
 append_cr () {
 
 Qsection.sub=section.val5Q
 EOF
 
-git config --null --list | tr '[\000]' 'Q' > result
+git config --null --list | tr '\000' 'Q' > result
 echo >>result
 
 test_expect_success '--null --list' 'cmp result expect'
 
-git config --null --get-regexp 'val[0-9]' | tr '[\000]' 'Q' > result
+git config --null --get-regexp 'val[0-9]' | tr '\000' 'Q' > result
 echo >>result
 
 test_expect_success '--null --get-regexp' 'cmp result expect'
 
 no-funny
 tabs   ," (dq) and spaces' >expected
 test_expect_success 'git ls-files -z with-funny' \
-       'git ls-files -z | tr \\0 \\012 >current &&
+       'git ls-files -z | tr \\000 \\012 >current &&
        git diff expected current'
 
 t1=`git write-tree`
 echo 'A
 tabs   ," (dq) and spaces' >expected
 test_expect_success 'git diff-index -z with-funny' \
-       'git diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
+       'git diff-index -z --name-status $t0 | tr \\000 \\012 >current &&
        git diff expected current'
 
 test_expect_success 'git diff-tree -z with-funny' \
-       'git diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
+       'git diff-tree -z --name-status $t0 $t1 | tr \\000 \\012 >current &&
        git diff expected current'
 
 cat > expected <<\EOF
 
        git diff | grep Binary
 '
 
-echo NULZbetweenZwords | tr Z '\0' > file
+echo NULZbetweenZwords | tr Z '\000' > file
 
 test_expect_success 'force diff with "diff"' '
        echo >.gitattributes "file diff" &&
 
 git-commit -m 'Initial Version' 2>/dev/null
 
 git-checkout -b binary
-tr 'x' '\0' <file1 >file3
+tr 'x' '\000' <file1 >file3
 cat file3 >file4
 git add file2
-tr '\0' 'v' <file3 >file1
+tr '\000' 'v' <file3 >file1
 rm -f file2
 git update-index --add --remove file1 file2 file3 file4
 git-commit -m 'Second Version'
 
 test_expect_success setup '
 
        for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
-       tr "[ijk]" '\''[\0\1\2]'\'' <file1 >file2 &&
+       tr "ijk" '\''\000\001\002'\'' <file1 >file2 &&
 
        git add file1 file2 &&
        git commit -m initial &&
        git tag initial &&
 
        for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
-       tr "[mon]" '\''[\0\1\2]'\'' <file1 >file2 &&
+       tr "mon" '\''\000\001\002'\'' <file1 >file2 &&
 
        git commit -a -m second &&
        git tag second &&
 
 test_expect_success 'rerere prefers first change' 'git diff a1 expect'
 
 rm $rr/postimage
-echo "$sha1    a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR
+echo "$sha1    a1" | tr '\012' '\000' > .git/rr-cache/MERGE_RR
 
 test_expect_success 'rerere clear' 'git rerere clear'
 
 
     'rm -f .git/index*
      for i in a b c
      do
-            dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
+            dd if=/dev/zero bs=4k count=1 | tr "\\000" $i >$i &&
             git update-index --add $i || return 1
      done &&
      cat c >d && echo foo >>d && git update-index --add d &&
 
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
-                       tr '[\0]' '[g]'
+                       tr '\000' 'g'
                } | ./test-sha1 $cnt
        `
        if test "$expect" = "$actual"
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
-                       tr '[\0]' '[g]'
+                       tr '\000' 'g'
                } | sha1sum |
                sed -e 's/ .*//'
        `