From c53da5a9a1da1b29db24d4e1ce2b294514d99ac2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 17 Dec 2024 00:00:49 -0600 Subject: smarter and faster mtime logic --- rill.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'rill.go') 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 +} -- cgit v1.2.3