Branch Coverage

deps/libgit2/src/config_entries.c
Criterion Covered Total %
branch 36 54 66.6


line true false branch
39 0 2314 GIT_ERROR_CHECK_ALLOC(entries);
42 0 2314 if ((error = git_strmap_new(&entries->map)) < 0)
56 0 14674 GIT_ERROR_CHECK_ALLOC(duplicated);
59 0 14674 GIT_ERROR_CHECK_ALLOC(duplicated->name);
61 14674 0 if (entry->value) {
63 0 14674 GIT_ERROR_CHECK_ALLOC(duplicated->value);
68 0 14674 if ((error = git_config_entries_append(entries, duplicated)) < 0)
72 0 14674 if (error && duplicated) {
0 0 if (error && duplicated) {
86 0 1108 if ((error = git_config_entries_new(&result)) < 0)
89 7769 1108 for (head = entries->list; head; head = head->next)
90 0 7769 if ((git_config_entries_dup_entry(result, head->entry)) < 0)
111 15263 2310 git_strmap_foreach_value(entries->map, head,
117 16159 2310 while (list != NULL) {
130 9710 1176 if (entries)
131 2310 7400 GIT_REFCOUNT_DEC(entries, config_entries_free);
2310 0 GIT_REFCOUNT_DEC(entries, config_entries_free);
139 896 15269 if ((map_head = git_strmap_get(entries->map, entry->name)) != NULL) {
151 0 15269 if ((git_strmap_set(entries->map, entry->name, map_head)) < 0)
157 0 16165 GIT_ERROR_CHECK_ALLOC(list_head);
160 14978 1187 if (entries->list)
172 4312 893 if ((entry = git_strmap_get(entries->map, key)) == NULL)
182 46 9 if ((entry = git_strmap_get(entries->map, key)) == NULL)
185 0 9 if (entry->multivar) {
190 0 9 if (entry->entry->include_depth) {
213 1107 7759 if (!it->head)
227 0 1108 GIT_ERROR_CHECK_ALLOC(it);