summaryrefslogtreecommitdiff
path: root/doTag.go
diff options
context:
space:
mode:
Diffstat (limited to 'doTag.go')
-rw-r--r--doTag.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/doTag.go b/doTag.go
index 8d0692a..161a581 100644
--- a/doTag.go
+++ b/doTag.go
@@ -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")