make something to get the hashes betwen branches

This commit is contained in:
Jeff Carr 2025-09-05 01:53:01 -05:00
parent db05f8a8aa
commit 658a2ce1a2
1 changed files with 12 additions and 0 deletions

View File

@ -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()