File tree Expand file tree Collapse file tree 11 files changed +18
-18
lines changed
Expand file tree Collapse file tree 11 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ while read commit parents; do
290290 eval " $filter_tree " < /dev/null ||
291291 die " tree filter failed: $filter_tree "
292292
293- git diff-index -r $commit | cut -f 2- | tr ' \n' ' \0 ' | \
293+ git diff-index -r $commit | cut -f 2- | tr ' \n' ' \000 ' | \
294294 xargs -0 git update-index --add --replace --remove
295295 git ls-files -z --others | \
296296 xargs -0 git update-index --add --replace --remove
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ compare_diff_raw_z () {
2121 # Also we do not check SHA1 hash generation in this test, which
2222 # is a job for t0000-basic.sh
2323
24- tr ' \0 ' ' \012' < " $1 " | sed -e " $sanitize_diff_raw_z " > .tmp-1
25- tr ' \0 ' ' \012' < " $2 " | sed -e " $sanitize_diff_raw_z " > .tmp-2
24+ tr ' \000 ' ' \012' < " $1 " | sed -e " $sanitize_diff_raw_z " > .tmp-1
25+ tr ' \000 ' ' \012' < " $2 " | sed -e " $sanitize_diff_raw_z " > .tmp-2
2626 git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
2727}
2828
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ test_description='CRLF conversion'
55. ./test-lib.sh
66
77q_to_nul () {
8- tr Q ' \0 '
8+ tr Q ' \000 '
99}
1010
1111append_cr () {
Original file line number Diff line number Diff line change @@ -591,12 +591,12 @@ Qsection.sub=section.val4
591591Qsection.sub=section.val5Q
592592EOF
593593
594- git config --null --list | tr ' [ \000] ' ' Q' > result
594+ git config --null --list | tr ' \000' ' Q' > result
595595echo >> result
596596
597597test_expect_success ' --null --list' ' cmp result expect'
598598
599- git config --null --get-regexp ' val[0-9]' | tr ' [ \000] ' ' Q' > result
599+ git config --null --get-regexp ' val[0-9]' | tr ' \000' ' Q' > result
600600echo >> result
601601
602602test_expect_success ' --null --get-regexp' ' cmp result expect'
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ echo 'just space
5454no-funny
5555tabs ," (dq) and spaces' > expected
5656test_expect_success ' git ls-files -z with-funny' \
57- ' git ls-files -z | tr \\0 \\012 >current &&
57+ ' git ls-files -z | tr \\000 \\012 >current &&
5858 git diff expected current'
5959
6060t1=` git write-tree`
@@ -83,11 +83,11 @@ test_expect_success 'git diff-tree with-funny' \
8383echo ' A
8484tabs ," (dq) and spaces' > expected
8585test_expect_success ' git diff-index -z with-funny' \
86- ' git diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
86+ ' git diff-index -z --name-status $t0 | tr \\000 \\012 >current &&
8787 git diff expected current'
8888
8989test_expect_success ' git diff-tree -z with-funny' \
90- ' git diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
90+ ' git diff-tree -z --name-status $t0 $t1 | tr \\000 \\012 >current &&
9191 git diff expected current'
9292
9393cat > expected << \EOF
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ test_expect_success 'no diff with -diff' '
9999 git diff | grep Binary
100100'
101101
102- echo NULZbetweenZwords | tr Z ' \0 ' > file
102+ echo NULZbetweenZwords | tr Z ' \000 ' > file
103103
104104test_expect_success ' force diff with "diff"' '
105105 echo >.gitattributes "file diff" &&
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ git update-index --add --remove file1 file2 file4
2424git-commit -m ' Initial Version' 2> /dev/null
2525
2626git-checkout -b binary
27- tr ' x' ' \0 ' < file1 > file3
27+ tr ' x' ' \000 ' < file1 > file3
2828cat file3 > file4
2929git add file2
30- tr ' \0 ' ' v' < file3 > file1
30+ tr ' \000 ' ' v' < file3 > file1
3131rm -f file2
3232git update-index --add --remove file1 file2 file3 file4
3333git-commit -m ' Second Version'
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ test_description='git apply in reverse
1212test_expect_success setup '
1313
1414 for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
15- tr "[ ijk] " ' \' ' [\0\1\2] ' \' ' <file1 >file2 &&
15+ tr "ijk" ' \' ' \000\001\002 ' \' ' <file1 >file2 &&
1616
1717 git add file1 file2 &&
1818 git commit -m initial &&
1919 git tag initial &&
2020
2121 for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
22- tr "[ mon] " ' \' ' [\0\1\2] ' \' ' <file1 >file2 &&
22+ tr "mon" ' \' ' \000\001\002 ' \' ' <file1 >file2 &&
2323
2424 git commit -a -m second &&
2525 git tag second &&
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ test_expect_success 'rerere kicked in' "! grep ======= a1"
129129test_expect_success ' rerere prefers first change' ' git diff a1 expect'
130130
131131rm $rr /postimage
132- echo " $sha1 a1" | tr ' \012' ' \0 ' > .git/rr-cache/MERGE_RR
132+ echo " $sha1 a1" | tr ' \012' ' \000 ' > .git/rr-cache/MERGE_RR
133133
134134test_expect_success ' rerere clear' ' git rerere clear'
135135
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ test_expect_success \
1515 ' rm -f .git/index*
1616 for i in a b c
1717 do
18- dd if=/dev/zero bs=4k count=1 | tr "\\0 " $i >$i &&
18+ dd if=/dev/zero bs=4k count=1 | tr "\\000 " $i >$i &&
1919 git update-index --add $i || return 1
2020 done &&
2121 cat c >d && echo foo >>d && git update-index --add d &&
You can’t perform that action at this time.
0 commit comments