summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-07 17:34:10 -0500
committerJeff Carr <[email protected]>2025-07-07 17:34:10 -0500
commit08b7f2406ccfc5c249c5fb59e9229e37d40fdb4d (patch)
tree63429aff3ec651329ff211e4ef270daa0b4f7d8d
parent041be81af1df2353227b24463cca99a3ef1c016a (diff)
more on 'forge pull'
-rw-r--r--Makefile2
-rw-r--r--doPull.go58
2 files changed, 26 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index e3a65b6..4c9bbdd 100644
--- a/Makefile
+++ b/Makefile
@@ -60,4 +60,4 @@ devel:
pull: install
forge pull dirty
- forge pull patches
+ # forge pull patches
diff --git a/doPull.go b/doPull.go
index d177784..b4aff68 100644
--- a/doPull.go
+++ b/doPull.go
@@ -48,49 +48,41 @@ func doGitPullNew() error {
return fmt.Errorf("not really 'fetch pull'")
}
- if argv.GitPull.Dirty != nil {
- found := findDirty()
- me.forge.PrintHumanTableFull(found)
+ if argv.Force {
+ now := time.Now()
+ pullcount := me.forge.RillFuncError(rillPull)
+ count := me.forge.RillReload()
+ if count != 0 {
+ me.forge.ConfigSave()
+ }
+
+ total, count, nope, _ := IsEverythingOnMaster()
+ log.Printf("Master branch check. %d total repos. (%d git pulled) (%d not on master branch) (%s) git pull total=%d\n", total, count, nope, shell.FormatDuration(time.Since(now)), pullcount)
return nil
}
- if argv.GitPull.Patches != nil {
- check := findReposWithPatches()
- me.forge.PrintHumanTableFull(check)
- found, err := me.forge.LookupPB(check)
- if err != nil {
- return err
- }
- me.forge.PrintHumanTableFull(found)
- return nil
+ check := gitpb.NewRepos()
+
+ if argv.GitPull.Dirty != nil {
+ check = findDirty()
}
- if argv.GitPull.Test != nil {
- log.Info("list repo's with updates here")
- found := doFind()
- // me.forge.PrintHumanTable(found)
- me.forge.PrintHumanTableFull(found)
- /*
- // print out the repos
- if argv.List.Full {
- me.forge.PrintHumanTableFull(found)
- } else {
- me.forge.PrintHumanTable(found)
- }
- */
- return nil
+ if argv.GitPull.Patches != nil {
+ check = findReposWithPatches()
}
- now := time.Now()
- pullcount := me.forge.RillFuncError(rillPull)
- count := me.forge.RillReload()
- if count != 0 {
- me.forge.ConfigSave()
+ if check.Len() == 0 {
+ check = doFind()
}
- total, count, nope, _ := IsEverythingOnMaster()
- log.Printf("Master branch check. %d total repos. (%d git pulled) (%d not on master branch) (%s) git pull total=%d\n", total, count, nope, shell.FormatDuration(time.Since(now)), pullcount)
+ me.forge.PrintHumanTableFull(check)
+ found, err := me.forge.LookupPB(check)
+ if err != nil {
+ return err
+ }
+ me.forge.PrintHumanTableFull(found)
return nil
+
}
/*