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 '' 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(',') { if args.cmd in 'pull,push,commit,delete'.split(',') {
gs.repos_print( gs.repos_print(
filter: args.filter filter: args.filter

View File

@@ -9,6 +9,7 @@ pub mut:
// only url needed because is a clone // only url needed because is a clone
url string url string
sshkey string sshkey string
recursive bool // If true, also clone submodules
} }
// Clones a new repository into the git structure based on the provided arguments. // Clones a new repository into the git structure based on the provided arguments.