Branch Coverage

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


line true false branch
39 0 2350 GIT_ERROR_CHECK_ALLOC(entries);
42 0 2350 if ((error = git_strmap_new(&entries->map)) < 0)
56 0 16000 GIT_ERROR_CHECK_ALLOC(duplicated);
59 0 16000 GIT_ERROR_CHECK_ALLOC(duplicated->name);
61 16000 0 if (entry->value) {
63 0 16000 GIT_ERROR_CHECK_ALLOC(duplicated->value);
68 0 16000 if ((error = git_config_entries_append(entries, duplicated)) < 0)
72 0 16000 if (error && duplicated) {
0 0 if (error && duplicated) {
86 0 1137 if ((error = git_config_entries_new(&result)) < 0)
89 8589 1137 for (head = entries->list; head; head = head->next)
90 0 8589 if ((git_config_entries_dup_entry(result, head->entry)) < 0)
111 16651 2350 git_strmap_foreach_value(entries->map, head,
117 17561 2350 while (list != NULL) {
130 9749 1206 if (entries)
131 2350 7399 GIT_REFCOUNT_DEC(entries, config_entries_free);
2350 0 GIT_REFCOUNT_DEC(entries, config_entries_free);
139 910 16651 if ((map_head = git_strmap_get(entries->map, entry->name)) != NULL) {
151 0 16651 if ((git_strmap_set(entries->map, entry->name, map_head)) < 0)
157 0 17561 GIT_ERROR_CHECK_ALLOC(list_head);
160 15219 2342 if (entries->list)
172 4283 892 if ((entry = git_strmap_get(entries->map, key)) == NULL)
182 47 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 1136 8589 if (!it->head)
227 0 1137 GIT_ERROR_CHECK_ALLOC(it);