aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authormatej.risek <matej.risek@hashicorp.com>2023-05-09 11:54:55 +0200
committermatej.risek <matej.risek@hashicorp.com>2023-06-05 13:59:34 +0200
commit2d6af16bf6d051cb3014c9970f3ea813e54f73b0 (patch)
tree915862150ed9b968d8da6900ebe9d48b71b4d62e /options.go
parent1dbd729a387edb61c89f088cd68040085e6c81bb (diff)
downloadgo-git-2d6af16bf6d051cb3014c9970f3ea813e54f73b0.tar.gz
git: add a clone option to allow for shallow cloning of submodules
This option matches the git clone option --shallow-submodules. https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---no-shallow-submodules
Diffstat (limited to 'options.go')
-rw-r--r--options.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/options.go b/options.go
index 3d75e03..8b26022 100644
--- a/options.go
+++ b/options.go
@@ -62,6 +62,9 @@ type CloneOptions struct {
// within, using their default settings. This option is ignored if the
// cloned repository does not have a worktree.
RecurseSubmodules SubmoduleRescursivity
+ // ShallowSubmodules limit cloning submodules to the 1 level of depth.
+ // It matches the git command --shallow-submodules.
+ ShallowSubmodules bool
// Progress is where the human readable information sent by the server is
// stored, if nil nothing is stored and the capability (if supported)
// no-progress, is sent to the server to avoid send this information.