diff --git a/ChangeLog.md b/ChangeLog.md index d413827320..bfb31d45eb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -8,6 +8,9 @@ Major changes: Other enhancements: +* `git` packages with submodules are supported by passing the `--recursive` + flag to `git clone`. + Bug fixes: ## 1.0.4 diff --git a/src/Stack/Config.hs b/src/Stack/Config.hs index 6c8994ba33..292c754f86 100644 --- a/src/Stack/Config.hs +++ b/src/Stack/Config.hs @@ -576,13 +576,14 @@ resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do unless exists $ do ignoringAbsence (removeDirRecur dirTmp) - let cloneAndExtract commandName resetCommand commit = do + let cloneAndExtract commandName cloneArgs resetCommand commit = do ensureDir (parent dirTmp) readInNull (parent dirTmp) commandName menv - [ "clone" - , T.unpack url + ("clone" : + cloneArgs ++ + [ T.unpack url , toFilePathNoTrailingSep dirTmp - ] + ]) Nothing readInNull dirTmp commandName menv (resetCommand ++ [T.unpack commit]) @@ -615,8 +616,8 @@ resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do tryTar `catchAllLog` tryZip `catchAllLog` err - RPTGit commit -> cloneAndExtract "git" ["reset", "--hard"] commit - RPTHg commit -> cloneAndExtract "hg" ["update", "-C"] commit + RPTGit commit -> cloneAndExtract "git" ["--recursive"] ["reset", "--hard"] commit + RPTHg commit -> cloneAndExtract "hg" [] ["update", "-C"] commit renameDir dirTmp dir