summaryrefslogtreecommitdiff
path: root/configfile.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-14 21:48:00 -0600
committerJeff Carr <[email protected]>2024-11-14 21:48:00 -0600
commite9d281b4cadd6831612c4ddf92e22e85cbcdfa43 (patch)
tree74c90f10153938e8786e9806dc9b136fbc65d82f /configfile.go
parenta397ca6f7d04ca0aa7bce0cc60c29d3da84bc55d (diff)
use scan()v0.22.14
Diffstat (limited to 'configfile.go')
-rw-r--r--configfile.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/configfile.go b/configfile.go
index b46c5a2..c6391a6 100644
--- a/configfile.go
+++ b/configfile.go
@@ -116,7 +116,9 @@ func (rl *RepoList) ArgGitPull() bool {
log.Log(REPOWARN, "running git pull everywhere")
var failed int = 0
- for _, repo := range rl.AllRepos() {
+ loop := rl.ReposSortByName()
+ for loop.Scan() {
+ repo := loop.Repo()
if out, err := repo.Status.GitPull(); err == nil {
log.Log(REPOWARN, "Ran git pull ok", repo.Status.Path(), out)
} else {
@@ -142,7 +144,9 @@ func (rl *RepoList) ArgCheckoutDevel() bool {
log.Log(REPOWARN, "running git checkout devel everwhere")
var failed int = 0
var count int = 0
- for _, repo := range rl.AllRepos() {
+ loop := rl.ReposSortByName()
+ for loop.Scan() {
+ repo := loop.Repo()
count += 1
if repo.Status.CheckoutDevel() {
// checkout ok
@@ -158,7 +162,9 @@ func (rl *RepoList) ArgCheckoutMaster() bool {
log.Log(REPOWARN, "running git checkout master everwhere")
var failed int = 0
var count int = 0
- for _, repo := range rl.AllRepos() {
+ loop := rl.ReposSortByName()
+ for loop.Scan() {
+ repo := loop.Repo()
count += 1
if repo.Status.CheckoutMaster() {
// checkout ok
@@ -174,7 +180,9 @@ func (rl *RepoList) ArgCheckoutUser() bool {
log.Log(REPOWARN, "running git checkout master everwhere")
var failed int = 0
var count int = 0
- for _, repo := range rl.AllRepos() {
+ loop := rl.ReposSortByName()
+ for loop.Scan() {
+ repo := loop.Repo()
count += 1
if repo.Status.CheckoutUser() {
// checkout ok