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

Function git_check_attr

attr.c:1325–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1323}
1324
1325void git_check_attr(struct index_state *istate,
1326 const char *path,
1327 struct attr_check *check)
1328{
1329 int i;
1330 const struct object_id *tree_oid = default_attr_source();
1331
1332 collect_some_attrs(istate, tree_oid, path, check);
1333
1334 for (i = 0; i < check->nr; i++) {
1335 unsigned int n = check->items[i].attr->attr_nr;
1336 const char *value = check->all_attrs[n].value;
1337 if (value == ATTR__UNKNOWN)
1338 value = compute_builtin_attr(istate, path, check->all_attrs[n].attr);
1339 check->items[i].value = value;
1340 }
1341}
1342
1343void git_all_attrs(struct index_state *istate,
1344 const char *path, struct attr_check *check)

Callers 9

match_pathspec_attrsFunction · 0.85
ll_mergeFunction · 0.85
ll_merge_marker_sizeFunction · 0.85
get_archive_attrsFunction · 0.85
whitespace_ruleFunction · 0.85
userdiff_find_by_pathFunction · 0.85
convert_attrsFunction · 0.85
check_attrFunction · 0.85
no_try_deltaFunction · 0.85

Calls 3

default_attr_sourceFunction · 0.85
collect_some_attrsFunction · 0.85
compute_builtin_attrFunction · 0.85

Tested by 1

match_pathspec_attrsFunction · 0.68