Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ref.go « gittest « git « internal - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7abbf4a83418b98e302a00028a3cf7dddea84787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package gittest

import (
	"testing"

	"gitlab.com/gitlab-org/gitaly/internal/git"
	"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
)

// WriteRef writes a reference into the repository pointing to the given object ID.
func WriteRef(t testing.TB, cfg config.Cfg, repoPath string, ref git.ReferenceName, oid git.ObjectID) {
	Exec(t, cfg, "-C", repoPath, "update-ref", ref.String(), oid.String())
}