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

Function attr_check_initl

attr.c:549–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549struct attr_check *attr_check_initl(const char *one, ...)
550{
551 struct attr_check *check;
552 int cnt;
553 va_list params;
554 const char *param;
555
556 va_start(params, one);
557 for (cnt = 1; (param = va_arg(params, const char *)) != NULL; cnt++)
558 ;
559 va_end(params);
560
561 check = attr_check_alloc();
562 check->nr = cnt;
563 check->alloc = cnt;
564 CALLOC_ARRAY(check->items, cnt);
565
566 check->items[0].attr = git_attr(one);
567 va_start(params, one);
568 for (cnt = 1; cnt < check->nr; cnt++) {
569 const struct git_attr *attr;
570 param = va_arg(params, const char *);
571 if (!param)
572 BUG("counted %d != ended at %d",
573 check->nr, cnt);
574 attr = git_attr(param);
575 if (!attr)
576 BUG("%s: not a valid attribute name", param);
577 check->items[cnt].attr = attr;
578 }
579 va_end(params);
580 return check;
581}
582
583struct attr_check *attr_check_dup(const struct attr_check *check)
584{

Callers 7

load_merge_attributesFunction · 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
no_try_deltaFunction · 0.85

Calls 2

attr_check_allocFunction · 0.85
git_attrFunction · 0.70

Tested by

no test coverage detected