-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
At the moment this library uses the mimetype to determine if a file is a text file
https://github.com/gitonomy/gitlib/blob/main/src/Gitonomy/Git/Blob.php#L106
This make for example the mimetype application/json be a binary type.
Git has build-in binary assignment for file. If possible it would be nice to use this.
One way to do it is with the git ls-files command
git ls-files <filePath> --eol --with-tree=<branch|commit|tree>A normal file would output:
git ls-files composer.json --eol --with-tree=HEAD
i/lf w/lf attr/ composer.jsonA binary file would output:
git ls-files a.out --eol --with-tree=main
i/-text w/-text attr/ a.outNotice the -text attrubutes
tolik518
Metadata
Metadata
Assignees
Labels
No labels