more on 'forge pull'

This commit is contained in:
Jeff Carr 2025-07-07 17:34:10 -05:00
parent 041be81af1
commit 08b7f2406c
2 changed files with 26 additions and 34 deletions

View File

@ -60,4 +60,4 @@ devel:
pull: install pull: install
forge pull dirty forge pull dirty
forge pull patches # forge pull patches

View File

@ -48,49 +48,41 @@ func doGitPullNew() error {
return fmt.Errorf("not really 'fetch pull'") return fmt.Errorf("not really 'fetch pull'")
} }
if argv.GitPull.Dirty != nil { if argv.Force {
found := findDirty() now := time.Now()
me.forge.PrintHumanTableFull(found) 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 return nil
} }
check := gitpb.NewRepos()
if argv.GitPull.Dirty != nil {
check = findDirty()
}
if argv.GitPull.Patches != nil { if argv.GitPull.Patches != nil {
check := findReposWithPatches() check = findReposWithPatches()
me.forge.PrintHumanTableFull(check)
found, err := me.forge.LookupPB(check)
if err != nil {
return err
}
me.forge.PrintHumanTableFull(found)
return nil
} }
if argv.GitPull.Test != nil { if check.Len() == 0 {
log.Info("list repo's with updates here") check = doFind()
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
} }
now := time.Now() me.forge.PrintHumanTableFull(check)
pullcount := me.forge.RillFuncError(rillPull) found, err := me.forge.LookupPB(check)
count := me.forge.RillReload() if err != nil {
if count != 0 { return err
me.forge.ConfigSave()
} }
me.forge.PrintHumanTableFull(found)
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 return nil
} }
/* /*