Commit 5019813
committed
Fix listing of file names with special characters to avoid crash and unrecognised names #204
Tweak the file listing to fix two issues found to affect files with
problematic names like `"Terrible file""")))(((][][].secret`.
This change may undo performance improvements achieved in #193.
- Ensure the `git check-attr filter` command does not quote file name
characters by using `-z` arg and some extra trickery to keep
space and newline delimiter characters for filter metadata and each
file name respectively.
This fixes a file named `"Terrible file""")))(((][][].secret`
being listed as just `Terrible file`.
- Adjust checking for `filter` and `crypt` strings to work with
changed output from `check-attr` command.
- Tweak `eval 'echo $filename'` portion of command to avoid script
crash on files with special characters with error message like
`eval: line 192: syntax error near unexpected token`1 parent efd42e5 commit 5019813
1 file changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
186 | | - | |
| 194 | + | |
187 | 195 | | |
188 | | - | |
| 196 | + | |
189 | 197 | | |
190 | 198 | | |
191 | | - | |
192 | | - | |
| 199 | + | |
| 200 | + | |
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
| |||
0 commit comments