make something to get the hashes betwen branches
This commit is contained in:
parent
db05f8a8aa
commit
658a2ce1a2
12
branches.go
12
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()
|
||||
|
|
Loading…
Reference in New Issue