From 3a96e147f259862b6ba5ab910d980cc6e3beec5e Mon Sep 17 00:00:00 2001 From: J Gregory Date: Thu, 12 Oct 2017 20:13:56 +0100 Subject: [PATCH] Fix #3 and #4 incomplete and packed refs The original git library dependency (github.com/gogits/git) did not correctly handle refs that have been packed. Pull request was made to address but appears that repo is no longer in active development. This PR proposes switching to use the code.gitea.io/git lib (from which the original dependency was forked) as this correctly identifies the tags. --- cmd/tag.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/tag.go b/cmd/tag.go index 19bb075..f0dc4af 100644 --- a/cmd/tag.go +++ b/cmd/tag.go @@ -18,6 +18,7 @@ import ( "fmt" "os/exec" + "code.gitea.io/git" "github.com/blang/semver" "github.com/gogits/git" "github.com/pkg/errors" @@ -128,7 +129,7 @@ func init() { func tag(repo *git.Repository, major, minor, patch uint64) error { fmt.Printf("Creating v%d.%d.%d\n", major, minor, patch) - id, err := repo.GetCommitIdOfBranch("master") + id, err := repo.GetBranchCommitID("master") if err != nil { return errors.Wrap(err, "Unable to get commit ID of branch ") }