diff options
author | Stefan Beller <sbeller@google.com> | 2017-05-26 12:10:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-30 14:28:53 +0900 |
commit | 58b75bd6db45a5108af41b764d617d677f26a6ca (patch) | |
tree | 14ceedcffb95f5d8f07cdf44ef9ab8ebb3c5ae6a /builtin/checkout.c | |
parent | 234b10d6f1efbb19fe0e3769f188b6b97cd2a519 (diff) | |
download | git-58b75bd6db45a5108af41b764d617d677f26a6ca.tar.gz |
submodule recursing: do not write a config variable twice
The command line option for '--recurse-submodules' is implemented
using an OPTION_CALLBACK, which takes both the callback (that sets
the file static global variable) as well as passes the same file
static global variable to the option parsing machinery to assign it.
This is fixed in this commit by passing NULL as the variable. The
callback sets it instead
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 6c3d2e4f4c..da5c9dc11c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1182,7 +1182,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) N_("second guess 'git checkout <no-such-branch>'")), OPT_BOOL(0, "ignore-other-worktrees", &opts.ignore_other_worktrees, N_("do not check if another worktree is holding the given ref")), - { OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, + { OPTION_CALLBACK, 0, "recurse-submodules", NULL, "checkout", "control recursive updating of submodules", PARSE_OPT_OPTARG, option_parse_recurse_submodules }, OPT_BOOL(0, "progress", &opts.show_progress, N_("force progress reporting")), |