summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2019-09-16 13:26:40 +0200
committerLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2019-12-04 13:23:22 +0100
commit4778452597027f6033db9f3ba6709913eadc3c8c (patch)
treec3e36cceeadde0713a1f154b075ca1176f1b4a8b /builtin/clone.c
parentMerge branch 'jk/fast-import-unsafe' (diff)
parentmingw: disallow backslash characters in tree objects' file names (diff)
downloadtgif-4778452597027f6033db9f3ba6709913eadc3c8c.tar.xz
Merge branch 'prevent-name-squatting-on-windows'
This patch series fixes an issue where Git could formerly have been tricked into creating a `.git` file with an unexpected (and therefore unprotected) NTFS short name. Incidentally, it also fixes an issue where a tree entry containing a backslash could be tricked into following a symbolic link, i.e. Git could be tricked into writing files outside the worktree. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index f7e17d2295..44b716923f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -757,7 +757,7 @@ static int checkout(int submodule_progress)
if (!err && (option_recurse_submodules.nr > 0)) {
struct argv_array args = ARGV_ARRAY_INIT;
- argv_array_pushl(&args, "submodule", "update", "--init", "--recursive", NULL);
+ argv_array_pushl(&args, "submodule", "update", "--require-init", "--recursive", NULL);
if (option_shallow_submodules == 1)
argv_array_push(&args, "--depth=1");