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. --- tools/syz-query-subsystems/query_subsystems.go | 2 +- tools/syz-testbuild/testbuild.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/syz-query-subsystems/query_subsystems.go b/tools/syz-query-subsystems/query_subsystems.go index 29fa9e81a..41a4a7a74 100644 --- a/tools/syz-query-subsystems/query_subsystems.go +++ b/tools/syz-query-subsystems/query_subsystems.go @@ -101,7 +101,7 @@ func determineCommitInfo(dir string) string { if err != nil { return fmt.Sprintf("failed to open repo: %v", err) } - commit, err := repo.HeadCommit() + commit, err := repo.Commit(vcs.HEAD) if err != nil { return fmt.Sprintf("failed to get HEAD commit: %v", err) } diff --git a/tools/syz-testbuild/testbuild.go b/tools/syz-testbuild/testbuild.go index 919ee0c67..ca6735e70 100644 --- a/tools/syz-testbuild/testbuild.go +++ b/tools/syz-testbuild/testbuild.go @@ -95,7 +95,7 @@ func main() { tool.Fail(err) } bisecter := repo.(vcs.Bisecter) - head, err := repo.HeadCommit() + head, err := repo.Commit(vcs.HEAD) if err != nil { tool.Fail(err) } -- cgit mrf-deployment