From 672e567aa124d43dbd0c28267584db940df8b435 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 25 Mar 2025 21:35:17 -0500 Subject: [PATCH] add --tag --- argv.go | 1 + main.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/argv.go b/argv.go index 904735d..f9b676c 100644 --- a/argv.go +++ b/argv.go @@ -14,6 +14,7 @@ type args struct { RepoPath string `arg:"--repo" default:"./" help:"path to the .git repo"` Hostname string `arg:"--hostname" help:"hostname to use"` Refs bool `arg:"--refs" help:"list the git ref hashes"` + Tag string `arg:"--tag" help:"what tag name to walk"` } func (args) Version() string { diff --git a/main.go b/main.go index 25818a4..894ca63 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,9 @@ func main() { showtags(repo) // v0.0.8 - printCommitsForTag(repo, "v0.22.2") + if argv.Tag != "" { + printCommitsForTag(repo, argv.Tag) + } } // lists the files in the git repo