git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Kaartic SivaraamNext: Patrick Steinhardt
Message 11 of 27 in “Fix inconsistent ref storage format terminology”
  1. 00/11 Fix inconsistent ref storage format terminologyPatrick Steinhardt, Sep 7, 2026
  2. 01/11 builtin/init: rename "--ref-format=" to "--ref-storage-format="Patrick Steinhardt, Sep 7, 2026
  3. Kaartic SivaraamSep 8, 2026
  4. Patrick SteinhardtSep 9, 2026
  5. Kaartic SivaraamSep 9, 2026
  6. 02/11 builtin/clone: rename "--ref-format=" to "--ref-storage-format="Patrick Steinhardt, Sep 7, 2026
  7. Kaartic SivaraamSep 8, 2026
  8. Patrick SteinhardtSep 9, 2026
  9. 03/11 builtin/refs: rename "--ref-format=" to "--ref-storage-format="Patrick Steinhardt, Sep 7, 2026
  10. Kaartic SivaraamSep 8, 2026
  11. Patrick SteinhardtSep 9, 2026
  12. 04/11 builtin/submodule: rename "--ref-format=" to "--ref-storage-format="Patrick Steinhardt, Sep 7, 2026
  13. 05/11 builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage-format"Patrick Steinhardt, Sep 7, 2026
  14. 06/11 help: rename "default-ref-format" to "default-ref-storage-format"Patrick Steinhardt, Sep 7, 2026
  15. 07/11 refs: expose function to parse reference URIsPatrick Steinhardt, Sep 7, 2026
  16. Kaartic SivaraamSep 8, 2026
  17. Patrick SteinhardtSep 9, 2026
  18. 08/11 setup: refactor how we configure the ref storage formatPatrick Steinhardt, Sep 7, 2026
  19. Kaartic SivaraamSep 9, 2026
  20. Patrick SteinhardtSep 9, 2026
  21. 09/11 setup: rename ref storage format environment variablesPatrick Steinhardt, Sep 7, 2026
  22. Kaartic SivaraamSep 9, 2026
  23. Patrick SteinhardtSep 9, 2026
  24. 10/11 setup: rename "init.defaultRefFormat" to "init.defaultRefStorageFormat"Patrick Steinhardt, Sep 7, 2026
  25. 11/11 setup: allow "git init --ref-storage-format=" to specify a payloadPatrick Steinhardt, Sep 7, 2026
  26. Kaartic SivaraamSep 9, 2026
  27. Patrick SteinhardtSep 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.