From: Junio C Hamano Date: Thu, 13 Jun 2024 16:39:08 +0000 (-0700) Subject: Merge branch 'ps/ref-storage-migration' into ps/use-the-repository X-Git-Tag: v2.46.0-rc0~20^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=092b33da2b198cc4428eb9383604204b6ef85fda;p=thirdparty%2Fgit.git Merge branch 'ps/ref-storage-migration' into ps/use-the-repository * ps/ref-storage-migration: builtin/refs: new command to migrate ref storage formats refs: implement logic to migrate between ref storage formats refs: implement removal of ref storages worktree: don't store main worktree twice reftable: inline `merged_table_release()` refs/files: fix NULL pointer deref when releasing ref store refs/files: extract function to iterate through root refs refs/files: refactor `add_pseudoref_and_head_entries()` refs: allow to skip creation of reflog entries refs: pass storage format to `ref_store_init()` explicitly refs: convert ref storage format to an enum setup: unset ref storage when reinitializing repository version --- 092b33da2b198cc4428eb9383604204b6ef85fda diff --cc builtin/clone.c index 730b3efae6,e808e02017..b89ca925b1 --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -970,8 -970,10 +970,8 @@@ int cmd_clone(int argc, const char **ar int submodule_progress; int filter_submodules = 0; int hash_algo; - unsigned int ref_storage_format = REF_STORAGE_FORMAT_UNKNOWN; + enum ref_storage_format ref_storage_format = REF_STORAGE_FORMAT_UNKNOWN; const int do_not_override_repo_unix_permissions = -1; - const char *template_dir; - char *template_dir_dup = NULL; struct transport_ls_refs_options transport_ls_refs_options = TRANSPORT_LS_REFS_OPTIONS_INIT; diff --cc refs/reftable-backend.c index 438b5c478b,da6b3162f3..9886fc67a4 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@@ -1,7 -1,7 +1,8 @@@ #include "../git-compat-util.h" #include "../abspath.h" #include "../chdir-notify.h" +#include "../config.h" + #include "../dir.h" #include "../environment.h" #include "../gettext.h" #include "../hash.h" diff --cc reftable/merged.h index a10469f58e,9db45c3196..2efe571da6 --- a/reftable/merged.h +++ b/reftable/merged.h @@@ -24,12 -24,4 +24,10 @@@ struct reftable_merged_table uint64_t max; }; - void merged_table_release(struct reftable_merged_table *mt); - +struct reftable_iterator; + +void merged_table_init_iter(struct reftable_merged_table *mt, + struct reftable_iterator *it, + uint8_t typ); + #endif