This commit is contained in:
2025-08-13 13:12:55 +02:00
parent 06a89aead9
commit b0ff9e3fbf
4 changed files with 6 additions and 7 deletions

View File

@@ -7,14 +7,12 @@ import net.http
// List a user's own repositories
pub fn (mut client GiteaClient) user_list_repos() ![]Repository {
$dbg;
req := httpconnection.Request{
method: .get
prefix: '/user/repos'
}
mut http_client := client.httpclient()!
r:=http_client.get_json_list_generic[Repository](req)!
$dbg;
return r
}

View File

@@ -111,7 +111,7 @@ pub fn cmd_git(mut cmdroot Command) {
required: false
name: 'load'
abbrev: 'l'
description: 'reload the data in cache.'
description: 'reload the data in cache for selected repos.'
})
}
@@ -208,7 +208,7 @@ fn cmd_git_execute(cmd Command) ! {
coderoot = os.environ()['CODEROOT']
}
mut gs := gittools.get()!
mut gs := gittools.get(coderoot: coderoot)!
if coderoot.len > 0 {
// is a hack for now
gs = gittools.new(coderoot: coderoot)!
@@ -217,7 +217,6 @@ fn cmd_git_execute(cmd Command) ! {
// create the filter for doing group actions, or action on 1 repo
mut filter := cmd.flags.get_string('filter') or { '' }
if cmd.name in gittools.gitcmds.split(',') {
mut pull := cmd.flags.get_bool('pull') or { false }
mut reset := cmd.flags.get_bool('reset') or { false }

View File

@@ -3,6 +3,7 @@ module gittools
import os
import json
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.ui.console
__global (
gsinstances map[string]&GitStructure
@@ -102,8 +103,10 @@ pub fn get(args_ GitStructureArgGet) !&GitStructure {
mut gs := gsinstances[rediskey_] or {
panic('Unexpected error: key not found in gsinstances')
}
gs.load(args.reload)!
gs.load(false)!
return gs
}else{
console.print_header("Loading GitStructure for ${args.coderoot}.")
}
// Create and load the GitStructure instance.

View File

@@ -165,7 +165,6 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string {
}
console.print_debug(" --- status all repo's\n need_commit0:${need_commit0} \n need_pull0:${need_pull0} \n need_push0:${need_push0}")
$dbg;
mut ok := false
if need_commit0 || need_pull0 || need_push0 {