This commit is contained in:
2025-02-05 08:14:48 +03:00
parent 69b405ba65
commit 430586cc89

View File

@@ -150,11 +150,14 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string {
need_pull0 = true need_pull0 = true
} }
if args.cmd in ["push","pull","commit"] && (need_push0 || need_pull0 || g.need_commit()!) { if args.cmd in ["push","pull","commit"] && (g.need_commit()!) {
need_commit0 = true need_commit0 = true
} }
} }
//console.print_debug(" --- status all repo's\n need_commit0:${need_commit0} \n need_pull0:${need_pull0} \n need_push0:${need_push0}")
//exit(0)
mut ok := false mut ok := false
if need_commit0 || need_pull0 || need_push0 { if need_commit0 || need_pull0 || need_push0 {
mut out := '\n ** NEED TO ' mut out := '\n ** NEED TO '
@@ -225,7 +228,7 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string {
g.commit(msg)! g.commit(msg)!
has_changed = true has_changed = true
} }
if need_push_repo { if need_pull_repo {
if args.reset { if args.reset {
console.print_header(' - remove changes ${g.account}/${g.name}') console.print_header(' - remove changes ${g.account}/${g.name}')
g.remove_changes()! g.remove_changes()!
@@ -234,7 +237,7 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string {
g.pull()! g.pull()!
has_changed = true has_changed = true
} }
if need_pull_repo { if need_push_repo {
console.print_header(' - push ${g.account}/${g.name}') console.print_header(' - push ${g.account}/${g.name}')
g.push()! g.push()!
has_changed = true has_changed = true