fix ignore whitelist checkbox logic

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-31 01:41:38 -06:00
parent 1c32636383
commit 537af9573e
2 changed files with 3 additions and 1 deletions

View File

@ -102,8 +102,10 @@ func globalDisplayOptions(box *gui.Node) {
group1.NewButton("git reset --hard", func() { group1.NewButton("git reset --hard", func() {
for _, repo := range me.allrepos { for _, repo := range me.allrepos {
if whitelist(repo.String()) { if whitelist(repo.String()) {
log.Warn("skipping whitelist", repo.String())
continue continue
} }
log.Warn("running git reset --hard", repo.String())
repo.status.RunCmd([]string{"git", "reset", "--hard"}) repo.status.RunCmd([]string{"git", "reset", "--hard"})
} }
}) })

View File

@ -23,7 +23,7 @@ func initWhitelist() {
func whitelist(path string) bool { func whitelist(path string) bool {
// log.Info("whitelist START", path) // log.Info("whitelist START", path)
if me.ignoreWhitelist.Checked() { if me.ignoreWhitelist.Checked() {
return true return false
} }
_, ok := release.whitelist[path] _, ok := release.whitelist[path]