From 658a2ce1a2fc83e63ceb5ce11daaec6a5179ec89 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 5 Sep 2025 01:53:01 -0500 Subject: [PATCH] make something to get the hashes betwen branches --- branches.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/branches.go b/branches.go index 2788300..4fa85b8 100644 --- a/branches.go +++ b/branches.go @@ -64,6 +64,18 @@ func (repo *Repo) GetTagHash(t string) string { return result.Stdout[0] } +// lookup a hash from a tag with 'git rev-list' +func (repo *Repo) GetBranchDifferences(from string, to string) []string { + // git rev-list -n 1 v0.0.66 + cmd := []string{"git", "rev-list", to + "..." + from} + result, _ := repo.RunStrict(cmd) + // log.Info("getLastTagVersion()", result.Stdout) + + // tmp := strings.TrimSpace(strings.Join(result.Stdout, "\n")) + // return shell.SplitNewLines(tmp) + return result.Stdout +} + // deletes the devel local branch if it is a subset of the remote devel branch func (repo *Repo) DeleteLocalDevelBranch() error { branch := repo.GetDevelBranchName()