This commit is contained in:
2025-07-21 13:40:04 +02:00
parent bb3dd2dbf9
commit 740b243356
2 changed files with 11 additions and 2 deletions

View File

@@ -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

View File

@@ -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.