summaryrefslogtreecommitdiff
path: root/doPull.go
diff options
context:
space:
mode:
Diffstat (limited to 'doPull.go')
-rw-r--r--doPull.go20
1 files changed, 20 insertions, 0 deletions
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()
+ }
+}