..
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user