@@ -15,7 +15,7 @@ test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
15
15
. ./test-lib.sh
16
16
17
17
p0=' no-funny'
18
- p1=' tabs and spaces'
18
+ p1=' tabs ," (dq) and spaces'
19
19
p2=' just space'
20
20
21
21
cat > " $p0 " << \EOF
@@ -39,15 +39,15 @@ echo "$t0" >t0
39
39
40
40
echo ' just space
41
41
no-funny
42
- "tabs\tand spaces"' > expected
42
+ "tabs\t,\" (dq) and spaces"' > expected
43
43
test_expect_success ' git-ls-files with-funny' \
44
44
' git-update-index --add "$p1" &&
45
45
git-ls-files >current &&
46
46
diff -u expected current'
47
47
48
48
echo ' just space
49
49
no-funny
50
- tabs and spaces' > expected
50
+ tabs ," (dq) and spaces' > expected
51
51
test_expect_success ' git-ls-files -z with-funny' \
52
52
' git-ls-files -z | tr \\0 \\012 >current &&
53
53
diff -u expected current'
@@ -57,12 +57,12 @@ echo "$t1" >t1
57
57
58
58
echo ' just space
59
59
no-funny
60
- "tabs\tand spaces"' > expected
60
+ "tabs\t,\" (dq) and spaces"' > expected
61
61
test_expect_success ' git-ls-tree with funny' \
62
62
' git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
63
63
diff -u expected current'
64
64
65
- echo ' A "tabs\tand spaces"' > expected
65
+ echo ' A "tabs\t,\" (dq) and spaces"' > expected
66
66
test_expect_success ' git-diff-index with-funny' \
67
67
' git-diff-index --name-status $t0 >current &&
68
68
diff -u expected current'
@@ -72,7 +72,7 @@ test_expect_success 'git-diff-tree with-funny' \
72
72
diff -u expected current'
73
73
74
74
echo ' A
75
- tabs and spaces' > expected
75
+ tabs ," (dq) and spaces' > expected
76
76
test_expect_success ' git-diff-index -z with-funny' \
77
77
' git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
78
78
diff -u expected current'
@@ -81,51 +81,51 @@ test_expect_success 'git-diff-tree -z with-funny' \
81
81
' git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
82
82
diff -u expected current'
83
83
84
- echo ' CNUM no-funny "tabs\tand spaces"' > expected
84
+ echo ' CNUM no-funny "tabs\t,\" (dq) and spaces"' > expected
85
85
test_expect_success ' git-diff-tree -C with-funny' \
86
86
' git-diff-tree -C --find-copies-harder --name-status \
87
87
$t0 $t1 | sed -e ' s/^C[0-9]* /CNUM/' >current &&
88
88
diff -u expected current'
89
89
90
- echo ' RNUM no-funny "tabs\tand spaces"' > expected
90
+ echo ' RNUM no-funny "tabs\t,\" (dq) and spaces"' > expected
91
91
test_expect_success ' git-diff-tree delete with-funny' \
92
92
' git-update-index --force-remove "$p0" &&
93
93
git-diff-index -M --name-status \
94
94
$t0 | sed -e ' s/^R[0-9]* /RNUM/' >current &&
95
95
diff -u expected current'
96
96
97
- echo ' diff --git a/no-funny "b/tabs\tand spaces"
97
+ echo ' diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
98
98
similarity index NUM%
99
99
rename from no-funny
100
- rename to "tabs\tand spaces"' > expected
100
+ rename to "tabs\t,\" (dq) and spaces"' > expected
101
101
102
102
test_expect_success ' git-diff-tree delete with-funny' \
103
103
' git-diff-index -M -p $t0 |
104
104
sed -e "s/index [0-9]*%/index NUM%/" >current &&
105
105
diff -u expected current'
106
106
107
107
chmod +x " $p1 "
108
- echo ' diff --git a/no-funny "b/tabs\tand spaces"
108
+ echo ' diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
109
109
old mode 100644
110
110
new mode 100755
111
111
similarity index NUM%
112
112
rename from no-funny
113
- rename to "tabs\tand spaces"' > expected
113
+ rename to "tabs\t,\" (dq) and spaces"' > expected
114
114
115
115
test_expect_success ' git-diff-tree delete with-funny' \
116
116
' git-diff-index -M -p $t0 |
117
117
sed -e "s/index [0-9]*%/index NUM%/" >current &&
118
118
diff -u expected current'
119
119
120
- echo > expected ' "tabs\tand spaces"
120
+ echo > expected ' "tabs\t,\" (dq) and spaces"
121
121
1 files changed, 0 insertions(+), 0 deletions(-)'
122
122
test_expect_success ' git-diff-tree rename with-funny applied' \
123
123
' git-diff-index -M -p $t0 |
124
124
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
125
125
diff -u expected current'
126
126
127
127
echo > expected ' no-funny
128
- "tabs\tand spaces"
128
+ "tabs\t,\" (dq) and spaces"
129
129
2 files changed, 3 insertions(+), 3 deletions(-)'
130
130
131
131
test_expect_success ' git-diff-tree delete with-funny applied' \
0 commit comments