aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs
diff options
context:
space:
mode:
authorSpace Meyer <spm@google.com>2023-06-14 17:44:08 +0200
committerSpace Meyer <git@the-space.agency>2023-06-15 11:08:36 +0200
commit6d79604c767234e6f2a6421c1c65d344cce452c4 (patch)
treedbc86c189528f838140c2f0fa2ce2c657c83b84b /pkg/vcs
parent4c2028c3d628cb632f26a8a216975e8f02e9a3ca (diff)
pkg/vcs: search cherry-picks by title
We sometimes cherry-pick fixes to a bisected branch, for issues that make large parts of history untestable. Previously we cherry-picked if the fix commit hash isn't already present. This is incorrect, as forks / lts trees may already cherry-picked the fix. In this case the fix would be present, but not have the expected hash. Unfortunately git doesn't have Change-Ids like gerrit, so there is no great way to check if a fix is already present. Instead we now just check whether any commit with the expected title is present.
Diffstat (limited to 'pkg/vcs')
-rw-r--r--pkg/vcs/linux.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go
index 29ea05280..b29e11664 100644
--- a/pkg/vcs/linux.go
+++ b/pkg/vcs/linux.go
@@ -172,11 +172,12 @@ func (ctx *linux) EnvForCommit(
// arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table
// We don't bisect that far back with neither clang nor gcc, so this should be fine:
fix := "1d489151e9f9d1647110277ff77282fe4d96d09b"
- contained, err := ctx.git.Contains(fix)
+ fixTitle := "objtool: Don't fail on missing symbol table"
+ searchResult, err := ctx.git.GetCommitByTitle(fixTitle)
if err != nil {
return nil, err
}
- if !contained {
+ if searchResult == nil {
_, err := ctx.git.git("cherry-pick", "--no-commit", fix)
if err != nil {
return nil, err