diff options
Diffstat (limited to 'doPull.go')
| -rw-r--r-- | doPull.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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() + } +} |
