MCPcopy Index your code
hub / github.com/git/git / git_path_check_encoding

Function git_path_check_encoding

convert.c:1251–1267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1249}
1250
1251static const char *git_path_check_encoding(struct attr_check_item *check)
1252{
1253 const char *value = check->value;
1254
1255 if (ATTR_UNSET(value) || !strlen(value))
1256 return NULL;
1257
1258 if (ATTR_TRUE(value) || ATTR_FALSE(value)) {
1259 die(_("true/false are no valid working-tree-encodings"));
1260 }
1261
1262 /* Don't encode to the default encoding */
1263 if (same_encoding(value, default_encoding))
1264 return NULL;
1265
1266 return value;
1267}
1268
1269static enum convert_crlf_action git_path_check_crlf(struct attr_check_item *check)
1270{

Callers 1

convert_attrsFunction · 0.85

Calls 2

same_encodingFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected