diff options
Diffstat (limited to 'doTag.go')
| -rw-r--r-- | doTag.go | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -24,14 +24,20 @@ func FindRepoByFullPath(wd string) *gitpb.Repo { return nil } +func findCurrentPwdRepoOrDie() *gitpb.Repo { + wd, err := os.Getwd() + repo := FindRepoByFullPath(wd) + if repo == nil { + log.Info("Could not find repo:", wd) + badExit(err) + } + return repo +} + func doTag() error { wd, _ := os.Getwd() if argv.Tag.List != nil { - repo := FindRepoByFullPath(wd) - if repo == nil { - log.Info("Could not find repo:", wd) - return nil - } + repo := findCurrentPwdRepoOrDie() tagTablePB := makeTagTablePB(repo.Tags) // tbox := win.Bottom.Box().SetProgName("TBOX") |
