Skip to content

Commit f502a63

Browse files
committed
astextplain: restore passthrough for empty files
Our astextplain helper used to pass through empty files and plaintext with the an expected extension. WHen we changed it to work based on mimetype rather than a predefined list of extensions in git-for-windows#624, both those passthroughs got lost. Plaintext passthrough has been restored in git-for-windows#626, but passthrough of empty files is still missing. Restore this functionality. This fixes git-for-windows/git#5977 Signed-off-by: Matthias Aßhauer <mha1993@live.de>
1 parent 2e98702 commit f502a63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-extra/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ sha256sums=('8ed76d1cb069ac8568f21c431f5e23caebea502d932ab4cdff71396f4f0d5b72'
8181
'dcbd1b981d5b899afe30151a5f5a27ea52025ff1335f131af1b5891f62ddd55b'
8282
'683ab066be19cb4defec470ebd53f165ca5dbf761fd40c13aee8abe31ba42803'
8383
'1cf2c13fb97c51375a76ed479362c3cbcdb51ab4d3a745e8d2c3a780badd8d46'
84-
'32223da4e1264d0c9663dd3d4b347131a634e96c2676d673ca58b2a6c58d2aea'
84+
'c6a92fc3bc23f19d396e9544353495d4591be481e9890f7bbb5968f7693091da'
8585
'1fae4ff3ce1e75ac90fe6f6130db4d041bc34f59deea679501f57d2c41d37560'
8686
'22f41610dea842890955032af30efdb60e80f310e95a04e57ab36b10e0376923'
8787
'8120b41b869693e07acc4707a0ab45505e7c5e4156a3a44b19152f1f425df85f'

git-extra/astextplain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ case "$(file --brief --mime-type "$1")" in
2121
out=$(pdftotext -q -layout -enc UTF-8 "$1" -) && sed "s/(\^M$)|(^\^L)//" <<<$out || cat "$1"
2222
;;
2323
# TODO add rtf support
24-
application/rtf | text/rtf | text/plain)
24+
application/rtf | text/rtf | text/plain | inode/x-empty)
2525
cat "$1"
2626
;;
2727
*)

0 commit comments

Comments
 (0)