Re: [PATCH 01/11] builtin/init: rename "--ref-format=" to "--ref-storage="
From: Patrick Steinhardt <hidden>
Date: 2026-09-07 10:00:49
On Fri, Sep 04, 2026 at 09:05:20AM -0400, Karthik Nayak wrote:
Patrick Steinhardt [off-list ref] writes:quoted
diff --git a/Documentation/config/init.adoc b/Documentation/config/init.adoc index 7b4abdaf8b..9c78440192 100644 --- a/Documentation/config/init.adoc +++ b/Documentation/config/init.adoc@@ -109,8 +109,10 @@ int cmd_init_db(int argc, N_("override the name of the initial branch")), OPT_STRING(0, "object-format", &object_format, N_("hash"), N_("specify the hash algorithm to use")), - OPT_STRING(0, "ref-format", &ref_format, N_("format"), - N_("specify the reference format to use")), + OPT_STRING(0, "ref-storage", &ref_storage, N_("format"), + N_("specify the reference storage format to use")),shouldn't we use 'ref-storage' for the argh value too?
I think having "format" as parameter name makes more sense. In any case, going by Junio's suggestion I've now renamed everything to ref storage format, and that makes "format" an even better parameter name, I think.
quoted
@@ -173,10 +175,10 @@ int cmd_init_db(int argc, die(_("unknown hash algorithm '%s'"), object_format); } - if (ref_format) { - ref_storage_format = ref_storage_format_by_name(ref_format); + if (ref_storage) { + ref_storage_format = ref_storage_format_by_name(ref_storage); if (ref_storage_format == REF_STORAGE_FORMAT_UNKNOWN) - die(_("unknown ref storage format '%s'"), ref_format); + die(_("unknown ref storage format '%s'"), ref_storage);Funny that we error'd out with 'ref storage' while the name was ref_format.
Well, it's inconsistencies all over the place :) Patrick