From b3b6e51565dcdbf81546f1d8f0121874a4e4fce9 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sun, 12 Feb 2017 23:03:47 +0100 Subject: submodule init implementation --- _examples/clone/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '_examples/clone') diff --git a/_examples/clone/main.go b/_examples/clone/main.go index 7d173a6..18d8a55 100644 --- a/_examples/clone/main.go +++ b/_examples/clone/main.go @@ -17,8 +17,9 @@ func main() { Info("git clone %s %s", url, directory) r, err := git.PlainClone(directory, false, &git.CloneOptions{ - URL: url, - Depth: 1, + URL: url, + RecursiveSubmodules: true, + Depth: 1, }) CheckIfError(err) -- cgit From d6a6decd1be0515faf36256ce06c58c7d662bbd0 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 14 Feb 2017 19:26:32 +0100 Subject: submodule update implementation --- _examples/clone/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '_examples/clone') diff --git a/_examples/clone/main.go b/_examples/clone/main.go index 18d8a55..d4d3880 100644 --- a/_examples/clone/main.go +++ b/_examples/clone/main.go @@ -14,12 +14,11 @@ func main() { directory := os.Args[2] // Clone the given repository to the given directory - Info("git clone %s %s", url, directory) + Info("git clone %s %s --recursive", url, directory) r, err := git.PlainClone(directory, false, &git.CloneOptions{ - URL: url, - RecursiveSubmodules: true, - Depth: 1, + URL: url, + RecurseSubmodules: git.DefaultRecursivity, }) CheckIfError(err) -- cgit From ed288b30de1ac3dcb3ce675c4b9af89eb4e6fcba Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 21 Feb 2017 16:03:39 +0100 Subject: documentation and API improvements --- _examples/clone/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '_examples/clone') diff --git a/_examples/clone/main.go b/_examples/clone/main.go index d4d3880..bcdb6a9 100644 --- a/_examples/clone/main.go +++ b/_examples/clone/main.go @@ -18,7 +18,7 @@ func main() { r, err := git.PlainClone(directory, false, &git.CloneOptions{ URL: url, - RecurseSubmodules: git.DefaultRecursivity, + RecurseSubmodules: git.DefaultSubmoduleRecursionDepth, }) CheckIfError(err) -- cgit