summaryrefslogtreecommitdiff
path: root/reload.go
diff options
context:
space:
mode:
Diffstat (limited to 'reload.go')
-rw-r--r--reload.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/reload.go b/reload.go
index 12786f4..5613f6c 100644
--- a/reload.go
+++ b/reload.go
@@ -14,9 +14,11 @@ func (repo *Repo) ReloadCheck() error {
if !repo.DidRepoChange() {
return nil
}
- // f.configSave = true
err := repo.Reload()
- return err
+ if err != nil {
+ return err
+ }
+ return log.Errorf("gitpb.ReloadCheck() detected a change in the repo")
}
// TODO: clean this up more, but it is working now more or less
@@ -73,7 +75,7 @@ func (repo *Repo) VerifyRemoteAndLocalBranches(bname string) bool {
// log.Info(r.FullPath, "local devel == remote devel", lh, rh)
return true
} else {
- log.Info(repo.FullPath, bname, "local != remote", lh, rh)
+ log.Info(lh, rh, "local != remote", repo.FullPath, bname)
}
return false
}
@@ -109,11 +111,13 @@ func (repo *Repo) setCurrentBranchVersion() {
log.Info("repo.GetCurrentBranchVersion() repo == nil")
return
}
- r, err := repo.RunQuiet([]string{"git", "describe", "--tags", "--always"})
+ r, err := repo.RunQuiet([]string{"git", "describe", "--tags"})
output := strings.Join(r.Stdout, "\n")
if err != nil {
- log.Log(WARN, "GetCurrentBranchVersion() not in a git repo?", err, repo.GetGoPath())
- log.Log(WARN, "GetCurrentBranchVersion() output might have worked anyway:", output)
+ // log.Log(WARN, "GetCurrentBranchVersion() not in a git repo?", err, repo.GetGoPath())
+ // log.Log(WARN, "GetCurrentBranchVersion() output might have worked anyway:", output)
+ repo.CurrentBranchVersion = "gitpb err"
+ return
}
repo.CurrentBranchVersion = strings.TrimSpace(output)
}