summaryrefslogtreecommitdiff
path: root/rill.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-17 00:00:49 -0600
committerJeff Carr <[email protected]>2024-12-17 00:00:49 -0600
commitc53da5a9a1da1b29db24d4e1ce2b294514d99ac2 (patch)
treec39b33f43d5be87313b3c0aa0c7bb7c58b2f72b6 /rill.go
parenta115ba144b00dc0339a8cf7eae6bdf2aab5fb4b5 (diff)
smarter and faster mtime logic
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
+}