summaryrefslogtreecommitdiff
path: root/doPull.go
diff options
context:
space:
mode:
Diffstat (limited to 'doPull.go')
-rw-r--r--doPull.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/doPull.go b/doPull.go
index 41e7815..93e9c0b 100644
--- a/doPull.go
+++ b/doPull.go
@@ -14,12 +14,19 @@ func rillPull(repo *gitpb.Repo) error {
return nil
}
t, _ := repo.LastGitPull()
- if time.Since(t) < time.Minute*10 {
+ if time.Since(t) < time.Minute*10 && !argv.Force {
if argv.Verbose {
log.Info(repo.GetFullPath(), "git pulled too recently", shell.FormatDuration(time.Since(t)))
}
return nil
}
+ cur := repo.GetCurrentBranchName()
+ if !repo.IsBranchRemote(cur) {
+ if argv.Verbose {
+ log.Info(repo.GetFullPath(), "branch is not remote", cur)
+ }
+ return nil
+ }
var cmd []string
cmd = append(cmd, "git", "pull")