From 835c000aefc6eb702bd326d77d08ac47abba675b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 19 Jan 2025 16:07:17 -0600 Subject: check devel branches --- doPull.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doPull.go') diff --git a/doPull.go b/doPull.go index 44a1b82..09ade34 100644 --- a/doPull.go +++ b/doPull.go @@ -29,3 +29,23 @@ func doGitPull() { } } + +// git fetch origin master:master +func rillFetchMaster(repo *gitpb.Repo) error { + if repo.GetCurrentBranchName() != repo.GetUserBranchName() { + // only fetch when branch is on the user branch + return nil + } + branch := repo.GetMasterBranchName() + cmd := []string{"git", "fetch", "origin", branch + ":" + branch} + _, err := repo.RunVerbose(cmd) + return err +} + +func doGitFetch() { + me.forge.RillFuncError(rillFetchMaster) + count := me.forge.RillReload() + if count != 0 { + me.forge.ConfigSave() + } +} -- cgit v1.2.3