Thread (67 messages) 67 messages, 4 authors, 20d ago

Re: [PATCH v2 03/11] builtin/refs: rename "--ref-format=" to "--ref-storage-format="

From: Kaartic Sivaraam <hidden>
Date: 2026-09-08 10:55:39

On 9/7/26 16:48, Patrick Steinhardt wrote:
quoted hunk ↗ jump to hunk
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.

Rest of the patch looks good to me.

--
Sivaraam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help