MCPcopy Create free account
hub / github.com/git/git / convert_is_binary

Function convert_is_binary

convert.c:94–103  ·  view source on GitHub ↗

* The same heuristics as diff.c::mmfile_is_binary() * We treat files with bare CR as binary */

Source from the content-addressed store, hash-verified

92 * We treat files with bare CR as binary
93 */
94static int convert_is_binary(const struct text_stat *stats)
95{
96 if (stats->lonecr)
97 return 1;
98 if (stats->nul)
99 return 1;
100 if ((stats->printable >> 7) < stats->nonprintable)
101 return 1;
102 return 0;
103}
104
105static unsigned int gather_convert_stats(const char *data, unsigned long size)
106{

Callers 3

gather_convert_statsFunction · 0.85
will_convert_lf_to_crlfFunction · 0.85
crlf_to_gitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected