From 740b2433569acdce1617f4347cb55d2147651ea3 Mon Sep 17 00:00:00 2001 From: despiegk Date: Mon, 21 Jul 2025 13:40:04 +0200 Subject: [PATCH] .. --- lib/develop/gittools/gittools_do.v | 8 ++++++++ lib/develop/gittools/repository_clone.v | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/develop/gittools/gittools_do.v b/lib/develop/gittools/gittools_do.v index c487cb2e..5eff64d2 100644 --- a/lib/develop/gittools/gittools_do.v +++ b/lib/develop/gittools/gittools_do.v @@ -118,6 +118,14 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string { return '' } + if args.cmd == 'clone' { + if args.url.len == 0 { + return error('URL needs to be specified for clone operation.') + } + gs.clone(url: args.url, recursive: args.recursive)! + return '' + } + if args.cmd in 'pull,push,commit,delete'.split(',') { gs.repos_print( filter: args.filter diff --git a/lib/develop/gittools/repository_clone.v b/lib/develop/gittools/repository_clone.v index 151e53c4..8b146c86 100644 --- a/lib/develop/gittools/repository_clone.v +++ b/lib/develop/gittools/repository_clone.v @@ -7,8 +7,9 @@ import os pub struct GitCloneArgs { pub mut: // only url needed because is a clone - url string - sshkey string + url string + sshkey string + recursive bool // If true, also clone submodules } // Clones a new repository into the git structure based on the provided arguments.