@@ -37,17 +37,15 @@ test_expect_success 'GIT_EXTERNAL_DIFF environment' '
37
37
38
38
'
39
39
40
- test_expect_success ' GIT_EXTERNAL_DIFF environment should apply only to diff' '
41
-
42
- GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD |
43
- grep "^diff --git a/file b/file"
40
+ test_expect_success ! SANITIZE_LEAK ' GIT_EXTERNAL_DIFF environment should apply only to diff' '
41
+ GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD >out &&
42
+ grep "^diff --git a/file b/file" out
44
43
45
44
'
46
45
47
46
test_expect_success ' GIT_EXTERNAL_DIFF environment and --no-ext-diff' '
48
-
49
- GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff |
50
- grep "^diff --git a/file b/file"
47
+ GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff >out &&
48
+ grep "^diff --git a/file b/file" out
51
49
52
50
'
53
51
@@ -83,16 +81,16 @@ test_expect_success 'diff.external' '
83
81
}
84
82
'
85
83
86
- test_expect_success ' diff.external should apply only to diff' '
84
+ test_expect_success ! SANITIZE_LEAK ' diff.external should apply only to diff' '
87
85
test_config diff.external echo &&
88
- git log -p -1 HEAD |
89
- grep "^diff --git a/file b/file"
86
+ git log -p -1 HEAD >out &&
87
+ grep "^diff --git a/file b/file" out
90
88
'
91
89
92
90
test_expect_success ' diff.external and --no-ext-diff' '
93
91
test_config diff.external echo &&
94
- git diff --no-ext-diff |
95
- grep "^diff --git a/file b/file"
92
+ git diff --no-ext-diff >out &&
93
+ grep "^diff --git a/file b/file" out
96
94
'
97
95
98
96
test_expect_success ' diff attribute' '
@@ -115,17 +113,15 @@ test_expect_success 'diff attribute' '
115
113
116
114
'
117
115
118
- test_expect_success ' diff attribute should apply only to diff' '
119
-
120
- git log -p -1 HEAD |
121
- grep "^diff --git a/file b/file"
116
+ test_expect_success ! SANITIZE_LEAK ' diff attribute should apply only to diff' '
117
+ git log -p -1 HEAD >out &&
118
+ grep "^diff --git a/file b/file" out
122
119
123
120
'
124
121
125
122
test_expect_success ' diff attribute and --no-ext-diff' '
126
-
127
- git diff --no-ext-diff |
128
- grep "^diff --git a/file b/file"
123
+ git diff --no-ext-diff >out &&
124
+ grep "^diff --git a/file b/file" out
129
125
130
126
'
131
127
@@ -148,17 +144,15 @@ test_expect_success 'diff attribute' '
148
144
149
145
'
150
146
151
- test_expect_success ' diff attribute should apply only to diff' '
152
-
153
- git log -p -1 HEAD |
154
- grep "^diff --git a/file b/file"
147
+ test_expect_success ! SANITIZE_LEAK ' diff attribute should apply only to diff' '
148
+ git log -p -1 HEAD >out &&
149
+ grep "^diff --git a/file b/file" out
155
150
156
151
'
157
152
158
153
test_expect_success ' diff attribute and --no-ext-diff' '
159
-
160
- git diff --no-ext-diff |
161
- grep "^diff --git a/file b/file"
154
+ git diff --no-ext-diff >out &&
155
+ grep "^diff --git a/file b/file" out
162
156
163
157
'
164
158
@@ -177,7 +171,8 @@ test_expect_success 'attributes trump GIT_EXTERNAL_DIFF and diff.external' '
177
171
178
172
test_expect_success ' no diff with -diff' '
179
173
echo >.gitattributes "file -diff" &&
180
- git diff | grep Binary
174
+ git diff >out &&
175
+ grep Binary out
181
176
'
182
177
183
178
echo NULZbetweenZwords | perl -pe ' y/Z/\000/' > file
0 commit comments