append_matching_ref(): rewrite to take an object_id argument
[gitweb.git] / notes.c
diff --git a/notes.c b/notes.c
index 2be4d7f3fd081476001212b103f011e45b4a9c41..baa1c4152d19c374a1b3bae908fb4069e2797198 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -932,9 +932,12 @@ static int string_list_add_one_ref(const char *refname, const unsigned char *sha
  */
 void string_list_add_refs_by_glob(struct string_list *list, const char *glob)
 {
+       struct each_ref_fn_sha1_adapter wrapped_string_list_add_one_ref =
+               {string_list_add_one_ref, list};
+
        assert(list->strdup_strings);
        if (has_glob_specials(glob)) {
-               for_each_glob_ref(string_list_add_one_ref, glob, list);
+               for_each_glob_ref(each_ref_fn_adapter, glob, &wrapped_string_list_add_one_ref);
        } else {
                unsigned char sha1[20];
                if (get_sha1(glob, sha1))