Skip to content

Commit 769f31b

Browse files
astextplain: restore passthrough for plaintext DOC/DOT files
The fix for git-for-windows/git#5641 broke diffs for plaintext DOC and DOT files: $ echo Test > test.doc $ git add test.doc $ git diff --cached E: unsupported filetype test.doc Since `file` correctly identifies the mimetype of such files as `text/plain`, this can be fixed by simply covering this case and printing the file content as it was done previously. Signed-off-by: Claudio Hoffmann <[email protected]>
1 parent 8d7eba8 commit 769f31b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)
24+
application/rtf | text/rtf | text/plain)
2525
cat "$1"
2626
;;
2727
*)

0 commit comments

Comments
 (0)