aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_tag_annotated.go
blob: cf6e9b3de8ee7452974bf6ede6d5ab1156291179 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package testgit

import (
	"testing"

	objectid "codeberg.org/lindenii/furgit/object/id"
)

// TagAnnotated creates an annotated tag object and returns the resulting tag object ID.
func (testRepo *TestRepo) TagAnnotated(tb testing.TB, name string, target objectid.ObjectID, message string) objectid.ObjectID {
	tb.Helper()
	testRepo.Run(tb, "tag", "-a", name, target.String(), "-m", message)

	return testRepo.RevParse(tb, "refs/tags/"+name)
}