summaryrefslogtreecommitdiff
path: root/rill.go
diff options
context:
space:
mode:
Diffstat (limited to 'rill.go')
-rw-r--r--rill.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/rill.go b/rill.go
index 142b201..7b4bb87 100644
--- a/rill.go
+++ b/rill.go
@@ -102,3 +102,18 @@ func (all *Repos) RillGitPull(part1 int, part2 int) map[*Repo]cmd.Status {
return allerr
}
+
+func (repo *Repo) GitPullRealtime() cmd.Status {
+ currentName := repo.GetCurrentBranchName()
+ if repo.IsOnlyLocalTag(currentName) {
+ var result cmd.Status
+ result.Exit = 21
+ result.Error = ErrorGitPullOnLocal
+ // log.Info("git pull skipped on local only branch", repo.GoPath)
+ return result
+ }
+ var cmd []string
+ cmd = append(cmd, "git", "pull")
+ r := repo.RunRealtime(cmd)
+ return r
+}