diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-16 09:48:46 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-16 09:48:46 -0700 |
| commit | 46536278a8b77de9b8726799c998b4b82ee9a7d9 (patch) | |
| tree | 4094657e4daa72326ff2efaedd4114d43078102e /notes.c | |
| parent | 19fe900cfce8096b7645ec9611a0b981f6bbd154 (diff) | |
| parent | c8f815c2083c4b340d4148a15d45c55f2fcc7d3f (diff) | |
| download | git-46536278a8b77de9b8726799c998b4b82ee9a7d9.tar.gz | |
Merge branch 'ps/refs-without-the-repository' into ps/refs-without-the-repository-updates
* ps/refs-without-the-repository:
refs: remove functions without ref store
cocci: apply rules to rewrite callers of "refs" interfaces
cocci: introduce rules to transform "refs" to pass ref store
refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
refs: introduce missing functions that accept a `struct ref_store`
Diffstat (limited to 'notes.c')
| -rw-r--r-- | notes.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -945,7 +945,8 @@ void string_list_add_refs_by_glob(struct string_list *list, const char *glob) { assert(list->strdup_strings); if (has_glob_specials(glob)) { - for_each_glob_ref(string_list_add_one_ref, glob, list); + refs_for_each_glob_ref(get_main_ref_store(the_repository), + string_list_add_one_ref, glob, list); } else { struct object_id oid; if (repo_get_oid(the_repository, glob, &oid)) @@ -1029,7 +1030,7 @@ void init_notes(struct notes_tree *t, const char *notes_ref, if (flags & NOTES_INIT_EMPTY || repo_get_oid_treeish(the_repository, notes_ref, &object_oid)) return; - if (flags & NOTES_INIT_WRITABLE && read_ref(notes_ref, &object_oid)) + if (flags & NOTES_INIT_WRITABLE && refs_read_ref(get_main_ref_store(the_repository), notes_ref, &object_oid)) die("Cannot use notes ref %s", notes_ref); if (get_tree_entry(the_repository, &object_oid, "", &oid, &mode)) die("Failed to read notes tree referenced by %s (%s)", |
