* [PATCH] builtin/push.c: fix description of --recurse-submodules option
@ 2014-11-18 17:57 Ralf Thielow
2014-11-19 0:46 ` Jiang Xin
0 siblings, 1 reply; 2+ messages in thread
From: Ralf Thielow @ 2014-11-18 17:57 UTC (permalink / raw
To: git; +Cc: gitster, hvoigt, phillip.szelat, worldhello.net, Ralf Thielow
The description of the option for argument "recurse-submodules"
is marked for translation even if it expects the untranslated
string and it's missing the option "on-demand" which was introduced
in eb21c73 (2014-03-29, push: teach --recurse-submodules the on-demand
option). Fix this by unmark the string for translation and add the
missing option.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
builtin/push.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/push.c b/builtin/push.c
index a076b19..cfa20c2 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -503,7 +503,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
0, CAS_OPT_NAME, &cas, N_("refname>:<expect"),
N_("require old value of ref to be at this value"),
PARSE_OPT_OPTARG, parseopt_push_cas_option },
- { OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
+ { OPTION_CALLBACK, 0, "recurse-submodules", &flags, "check|on-demand",
N_("control recursive pushing of submodules"),
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
--
2.2.0.rc2.258.gc851c5b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] builtin/push.c: fix description of --recurse-submodules option
2014-11-18 17:57 [PATCH] builtin/push.c: fix description of --recurse-submodules option Ralf Thielow
@ 2014-11-19 0:46 ` Jiang Xin
0 siblings, 0 replies; 2+ messages in thread
From: Jiang Xin @ 2014-11-19 0:46 UTC (permalink / raw
To: Ralf Thielow; +Cc: Git List, Junio C Hamano, hvoigt, phillip.szelat
2014-11-19 1:57 GMT+08:00 Ralf Thielow <ralf.thielow@gmail.com>:
> The description of the option for argument "recurse-submodules"
> is marked for translation even if it expects the untranslated
> string and it's missing the option "on-demand" which was introduced
> in eb21c73 (2014-03-29, push: teach --recurse-submodules the on-demand
> option). Fix this by unmark the string for translation and add the
> missing option.
>
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
> builtin/push.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index a076b19..cfa20c2 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -503,7 +503,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
> 0, CAS_OPT_NAME, &cas, N_("refname>:<expect"),
> N_("require old value of ref to be at this value"),
> PARSE_OPT_OPTARG, parseopt_push_cas_option },
> - { OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
> + { OPTION_CALLBACK, 0, "recurse-submodules", &flags, "check|on-demand",
Yes, should not mark this for translation, and only two available options
for the "--recurse-submodules" flag.
The following code snippet is from builtin/push.c:
451 static int option_parse_recurse_submodules(const struct option *opt,
452 const char *arg, int unset)
453 {
454 int *flags = opt->value;
455
456 if (*flags & (TRANSPORT_RECURSE_SUBMODULES_CHECK |
457 TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND))
458 die("%s can only be used once.", opt->long_name);
459
460 if (arg) {
461 if (!strcmp(arg, "check"))
462 *flags |= TRANSPORT_RECURSE_SUBMODULES_CHECK;
463 else if (!strcmp(arg, "on-demand"))
464 *flags |= TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND;
465 else
466 die("bad %s argument: %s", opt->long_name, arg);
467 } else
468 die("option %s needs an argument (check|on-demand)",
469 opt->long_name);
470
471 return 0;
472 }
> N_("control recursive pushing of submodules"),
> PARSE_OPT_OPTARG, option_parse_recurse_submodules },
> OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
> --
> 2.2.0.rc2.258.gc851c5b
>
--
Jiang Xin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-19 0:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 17:57 [PATCH] builtin/push.c: fix description of --recurse-submodules option Ralf Thielow
2014-11-19 0:46 ` Jiang Xin
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).