Merge branch 'ps/refs-without-the-repository'

The refs API lost functions that implicitly assumes to work on the
primary ref_store by forcing the callers to pass a ref_store as an
argument.

* 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`
This commit is contained in:
Junio C Hamano
2024-05-16 10:10:13 -07:00
77 changed files with 1052 additions and 680 deletions

View File

@ -2067,7 +2067,7 @@ void create_reference_database(unsigned int ref_storage_format,
die(_("invalid initial branch name: '%s'"),
initial_branch);
if (create_symref("HEAD", ref, NULL) < 0)
if (refs_create_symref(get_main_ref_store(the_repository), "HEAD", ref, NULL) < 0)
exit(1);
free(ref);
}