| 218 | } |
| 219 | |
| 220 | void load_ref_decorations(struct decoration_filter *filter, int flags) |
| 221 | { |
| 222 | if (!decoration_loaded) { |
| 223 | if (filter) { |
| 224 | struct string_list_item *item; |
| 225 | for_each_string_list_item(item, filter->exclude_ref_pattern) { |
| 226 | normalize_glob_ref(item, NULL, item->string); |
| 227 | } |
| 228 | for_each_string_list_item(item, filter->include_ref_pattern) { |
| 229 | normalize_glob_ref(item, NULL, item->string); |
| 230 | } |
| 231 | for_each_string_list_item(item, filter->exclude_ref_config_pattern) { |
| 232 | normalize_glob_ref(item, NULL, item->string); |
| 233 | } |
| 234 | |
| 235 | /* normalize_glob_ref duplicates the strings */ |
| 236 | filter->exclude_ref_pattern->strdup_strings = 1; |
| 237 | filter->include_ref_pattern->strdup_strings = 1; |
| 238 | filter->exclude_ref_config_pattern->strdup_strings = 1; |
| 239 | } |
| 240 | decoration_loaded = 1; |
| 241 | decoration_flags = flags; |
| 242 | refs_for_each_ref(get_main_ref_store(the_repository), |
| 243 | add_ref_decoration, filter); |
| 244 | refs_head_ref(get_main_ref_store(the_repository), |
| 245 | add_ref_decoration, filter); |
| 246 | for_each_commit_graft(add_graft_decoration, filter); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void load_branch_decorations(void) |
| 251 | { |
no test coverage detected