diff options
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -19,22 +19,22 @@ func reposChanged(b bool) { // returns true based on os.Stat() only checks // seems to kinda work ok. goal is to avoid os.Exec() here for speed // this might be the 1 place where libgit2 would be a good idea -func (repo *Repo) HasChanged() bool { +func (repo *Repo) HasChanged() error { return repo.DidRepoChange() } // does a fast check with os.Stat() // if the mtimes changed, does a full repo.ReloadForce() func (repo *Repo) ReloadCheck() error { - if !repo.DidRepoChange() { + err := repo.DidRepoChange() + if err == nil { return nil } reposChanged(true) - err := repo.ReloadForce() - if err != nil { + if err := repo.ReloadForce(); err != nil { return err } - return log.Errorf("gitpb.ReloadCheck() detected a change in the repo") + return err } // TODO: clean this up more, but it is working now more or less |
