aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/ls-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-24 17:25:33 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-24 17:25:34 -0700
commit2bc5414c411aab33c155b1070b7764ef6a49a02d (patch)
tree3f2b065f7c9c54838ab380ba5d16e7a9f742344b /builtin/ls-remote.c
parentMerge branch 'ds/doc-disable-hooks' (diff)
parentparse-options: detect mismatches in integer signedness (diff)
downloadgit-2bc5414c411aab33c155b1070b7764ef6a49a02d.tar.gz
git-2bc5414c411aab33c155b1070b7764ef6a49a02d.zip
Merge branch 'ps/parse-options-integers'
Update parse-options API to catch mistakes to pass address of an integral variable of a wrong type/size. * ps/parse-options-integers: parse-options: detect mismatches in integer signedness parse-options: introduce precision handling for `OPTION_UNSIGNED` parse-options: introduce precision handling for `OPTION_INTEGER` parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()` parse-options: support unit factors in `OPT_INTEGER()` global: use designated initializers for options parse: fix off-by-one for minimum signed values
Diffstat (limited to 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 42f34e1236..01a4d4daa1 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -67,9 +67,14 @@ int cmd_ls_remote(int argc,
OPT__QUIET(&quiet, N_("do not print remote URL")),
OPT_STRING(0, "upload-pack", &uploadpack, N_("exec"),
N_("path of git-upload-pack on the remote host")),
- { OPTION_STRING, 0, "exec", &uploadpack, N_("exec"),
- N_("path of git-upload-pack on the remote host"),
- PARSE_OPT_HIDDEN },
+ {
+ .type = OPTION_STRING,
+ .long_name = "exec",
+ .value = &uploadpack,
+ .argh = N_("exec"),
+ .help = N_("path of git-upload-pack on the remote host"),
+ .flags = PARSE_OPT_HIDDEN,
+ },
OPT_BIT('t', "tags", &flags, N_("limit to tags"), REF_TAGS),
OPT_BIT('b', "branches", &flags, N_("limit to branches"), REF_BRANCHES),
OPT_BIT_F('h', "heads", &flags,