diff options
| author | Jeff Carr <[email protected]> | 2025-09-17 01:08:30 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-17 01:08:30 -0500 |
| commit | ce0fd10064440ebce0fe4941bb15cf4beb14540a (patch) | |
| tree | 738c8d52819fb7158762480a68962efd0312e6cd /doTag.go | |
| parent | ae2cbf1886cb6bd71647c7d6ce1ed55f016c5618 (diff) | |
common argv handling
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") |
