Re: [PATCH v2 03/11] builtin/refs: rename "--ref-format=" to "--ref-storage-format="
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 9, 2026, 07:03 UTC
- Message-ID
- <aqEE0PdjrRnLDkGA@pks.im>
- In-Reply-To
- <53eac227-1034-4dd5-9f4d-416537dcdd1e@gmail.com>
On Tue, Sep 08, 2026 at 04:25:35PM +0530, Kaartic Sivaraam wrote:
Show 32 quoted lines
> On 9/7/26 16:48, Patrick Steinhardt wrote:
> > index 5cd21c25fe..53b12accaf 100644
> > --- a/builtin/refs.c
> > +++ b/builtin/refs.c
> > @@ -10,7 +10,7 @@
> > #include "refs/refs-internal.h"
> > #define REFS_MIGRATE_USAGE \
> > - N_("git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]")
> > + N_("git refs migrate --ref-storage-format=<format> [--no-reflog] [--dry-run]")
> > #define REFS_VERIFY_USAGE \
> > N_("git refs verify [--strict] [--verbose]")
> > @@ -44,9 +44,12 @@ static int cmd_refs_migrate(int argc, const char **argv, const char *prefix,
> > enum ref_storage_format format;
> > unsigned int flags = 0;
> > struct option options[] = {
> > - OPT_STRING_F(0, "ref-format", &format_str, N_("format"),
> > - N_("specify the reference format to convert to"),
> > + OPT_STRING_F(0, "ref-storage-format", &format_str, N_("format"),
> > + N_("specify the reference storage format to convert to"),
> > PARSE_OPT_NONEG),
>
> This is a bit of a tangent to the change that the patch aims for.
>
> The `PARSE_OPT_NONEG` flag made me wonder if we needed the same in other
> commands that accept this argument too. I tried to take a quick look at the
> series that introduced the `git refs` command and I could not find any
> specific rationale behind why the argument to this specific command should
> have the PARSE_OPT_NONEG flag. May be we could drop the flag for `git refs`
> command to make it consistent with how the argument is supported in other
> commands?
>
> Either way not a show-stopper for this series, of course.We might want to do that, yeah. But it's certainly outside the scope of this patch series, so I'll not include it here.
Patrick