Commit 0566396
committed
fix: don't show 'binary file' placeholder for empty files
A file with no content changes (empty added file, rename without
content change, deleted empty file) has no patch in the GitHub files
API, and the diff placeholder treated every patchless file as binary
or too large — showing 'Binary file or file too large to display' for
an empty file. Distinguish the benign cases by status and git's
empty-blob SHA, and keep the binary/too-large message for the rest.1 parent e378806 commit 0566396
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
1302 | | - | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1303 | 1311 | | |
1304 | 1312 | | |
1305 | 1313 | | |
| |||
0 commit comments