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

Function gather_convert_stats

convert.c:105–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105static unsigned int gather_convert_stats(const char *data, unsigned long size)
106{
107 struct text_stat stats;
108 int ret = 0;
109 if (!data || !size)
110 return 0;
111 gather_stats(data, size, &stats);
112 if (convert_is_binary(&stats))
113 ret |= CONVERT_STAT_BITS_BIN;
114 if (stats.crlf)
115 ret |= CONVERT_STAT_BITS_TXT_CRLF;
116 if (stats.lonelf)
117 ret |= CONVERT_STAT_BITS_TXT_LF;
118
119 return ret;
120}
121
122static const char *gather_convert_stats_ascii(const char *data, unsigned long size)
123{

Callers 2

has_crlf_in_indexFunction · 0.85

Calls 2

gather_statsFunction · 0.85
convert_is_binaryFunction · 0.85

Tested by

no test coverage detected