summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:31 (GMT)
commit05fc6471e3668f17b665ec686d5629e92df917fa (patch)
treec7d5e2c7f5fe6f6ee2d63b149dde24a9fbc38642 /builtin
parentecbddd16bb2c725ad2305fd911bf237d845c862b (diff)
parent4782cf2ab686bacca8d2908319981ac27d54ca25 (diff)
downloadgit-05fc6471e3668f17b665ec686d5629e92df917fa.zip
git-05fc6471e3668f17b665ec686d5629e92df917fa.tar.gz
git-05fc6471e3668f17b665ec686d5629e92df917fa.tar.bz2
Merge branch 'pb/no-recursive-reset-hard-in-worktree-add'
"git worktree add" internally calls "reset --hard" that should not descend into submodules, even when submodule.recurse configuration is set, but it was affected. This has been corrected. * pb/no-recursive-reset-hard-in-worktree-add: worktree: teach "add" to ignore submodule.recurse config
Diffstat (limited to 'builtin')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 4de44f5..d6bc526 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -376,7 +376,7 @@ static int add_worktree(const char *path, const char *refname,
if (opts->checkout) {
cp.argv = NULL;
argv_array_clear(&cp.args);
- argv_array_pushl(&cp.args, "reset", "--hard", NULL);
+ argv_array_pushl(&cp.args, "reset", "--hard", "--no-recurse-submodules", NULL);
if (opts->quiet)
argv_array_push(&cp.args, "--quiet");
cp.env = child_env.argv;