* The list argument must have strdup_strings set on it. */
| 950 | * The list argument must have strdup_strings set on it. |
| 951 | */ |
| 952 | void string_list_add_refs_by_glob(struct string_list *list, const char *glob) |
| 953 | { |
| 954 | assert(list->strdup_strings); |
| 955 | if (has_glob_specials(glob)) { |
| 956 | struct refs_for_each_ref_options opts = { |
| 957 | .pattern = glob, |
| 958 | }; |
| 959 | refs_for_each_ref_ext(get_main_ref_store(the_repository), |
| 960 | string_list_add_one_ref, list, &opts); |
| 961 | } else { |
| 962 | struct object_id oid; |
| 963 | if (repo_get_oid(the_repository, glob, &oid)) |
| 964 | warning("notes ref %s is invalid", glob); |
| 965 | if (!unsorted_string_list_has_string(list, glob)) |
| 966 | string_list_append(list, glob); |
| 967 | } |
| 968 | } |
| 969 | |
| 970 | void string_list_add_refs_from_colon_sep(struct string_list *list, |
| 971 | const char *globs) |
no test coverage detected