Using git way to check if a file is binary. Using git's heuristics to detect a binary file. See https://git.kernel.org/pub/scm/git/git.git/tree/xdiff-interface.c?id ...