summaryrefslogtreecommitdiff
path: root/builtin/read-tree.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-05-26 19:10:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-30 05:28:53 (GMT)
commit58b75bd6db45a5108af41b764d617d677f26a6ca (patch)
tree14ceedcffb95f5d8f07cdf44ef9ab8ebb3c5ae6a /builtin/read-tree.c
parent234b10d6f1efbb19fe0e3769f188b6b97cd2a519 (diff)
downloadgit-58b75bd6db45a5108af41b764d617d677f26a6ca.zip
git-58b75bd6db45a5108af41b764d617d677f26a6ca.tar.gz
git-58b75bd6db45a5108af41b764d617d677f26a6ca.tar.bz2
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/read-tree.c')
-rw-r--r--builtin/read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 23e212e..2a1b8a5 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -157,7 +157,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
N_("skip applying sparse checkout filter")),
OPT_BOOL(0, "debug-unpack", &opts.debug_unpack,
N_("debug unpack-trees")),
- { 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_END()