From 42d3a37026616a8cb3a9da11ab8e5565ca6b6074 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Oct 2024 18:09:10 +0200 Subject: pkg/vcs: change HeadCommit to Commit Currently we have HeadCommit function that returns info about the HEAD commit. Change it to a more flexible Commit function that can return info about any commit. This will be used in future changes. --- pkg/vcs/git_test_util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/vcs/git_test_util.go') diff --git a/pkg/vcs/git_test_util.go b/pkg/vcs/git_test_util.go index d341c6144..79b2d958a 100644 --- a/pkg/vcs/git_test_util.go +++ b/pkg/vcs/git_test_util.go @@ -69,7 +69,7 @@ func (repo *TestRepo) CommitFileChange(branch, change string) { if repo.Commits[branch] == nil { repo.Commits[branch] = make(map[string]*Commit) } - com, err := repo.repo.HeadCommit() + com, err := repo.repo.Commit(HEAD) if err != nil { repo.t.Fatal(err) } @@ -78,7 +78,7 @@ func (repo *TestRepo) CommitFileChange(branch, change string) { func (repo *TestRepo) CommitChange(description string) *Commit { repo.Git("commit", "--allow-empty", "-m", description) - com, err := repo.repo.HeadCommit() + com, err := repo.repo.Commit(HEAD) if err != nil { repo.t.Fatal(err) } -- cgit mrf-deployment