summaryrefslogtreecommitdiff
path: root/doPull.go
blob: 44a1b8272a603f18aa5b2688932f90032886a5e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main

import (
	"go.wit.com/lib/protobuf/gitpb"
	"go.wit.com/log"
)

func doGitPull() {
	allerr := me.found.RillGitPull(40, 5)

	all := me.found.SortByFullPath()
	for all.Scan() {
		repo := all.Next()
		result := allerr[repo]
		if result.Error == gitpb.ErrorGitPullOnDirty {
			log.Info("skip git pull. repo is dirty", repo.GetGoPath())
			continue
		}
		if result.Error == gitpb.ErrorGitPullOnLocal {
			log.Info("skip git pull. local branch ", repo.GetGoPath())
			continue
		}
		if result.Exit == 0 {
			continue
		}

		log.Info("git pull error:", repo.GetGoPath(), result.Error)
		log.Info("git pull error:", repo.GetGoPath(), result.Stdout)
	}

}